Hi Prasad.
I would not recommend directly calling against a GraphQL query to access monitoring project results. This is as the GraphQL APIs are unversioned and subject to change between releases, increasing maintenance considerations for your pipeline.
Instead, I would point you to use a Post Processing Plan for each dataset in the monitoring project (if you are on v14 or earlier, this will be in ONE Desktop, but in v15 onwards can be done through the Web App). When you generate the post processing plan, it will be a template that returns the source dataset + the DQ results (both pass and fail).
You can then use a Filter step to filter for invalid rows of data where that have failed (will be along the lines of `invalid_rules IS NOT NULL`.
Because this dataset shows as 1 row of data per 1 row of source data, all rule failures for each row are combined together in a single string (e.g. `failed_rule_1;failed_rule_56;failed_rule_78`). You can therefore use a Splitter step, and split by ‘;’ to explode out multiple reasons for rule failures into 1 line for each rule failure.
You can then finally use a JDBC writer step to write to your database.
Hope this helps!
-Oliver