DataQuality rules cannot be parsed

0

Hi, i'm creating a resulset for a table mapped from SnowFlake, i want to apply a dataquality rule to that table, i'm not sure if it's possilbe.

Name Database Location Classification snowflake_sample_data_tpch_sf1_nation testdb SNOWFLAKE_SAMPLE_DATA.TPCH_SF1.NATION snowflake

when i try to save the rilset appears the next message:

Error encountered InvalidInputException (status: 400): DataQuality rules cannot be parsed See details { "message": "DataQuality rules cannot be parsed", "code": "InvalidInputException", "time": "2023-05-21T21:28:57.097Z", "requestId": "XXX", "statusCode": 400, "retryable": false }

Cheers

1 Answer
0

Hello, Warm greetings from AWS!

This error generally occurs if the required permissions are not granted to the user setting the DQ rules or there is some issue with DQ rules arguments.

I would suggested you to try the following Glue AWS CLI command to create the DQ rule:

For e.g. aws glue create-data-quality-ruleset --name yellow-stone-dq --ruleset 'Rules= [IsComplete "event_key"]' --target-table '{"TableName":"noun-facts-json-table", "DatabaseName":"prod-yellow-stone"}'

Ref. [+] https://docs.aws.amazon.com/cli/latest/reference/glue/create-data-quality-ruleset.html

To know about the DQ DL syntax and Rule structure, please refer to this doc [+] https://docs.aws.amazon.com/glue/latest/dg/dqdl.html

In addition to above rules, IAM permissions required to add the rules are described in this doc [+] https://docs.aws.amazon.com/glue/latest/dg/data-quality-authorization.html

other documentations that you can find helpful are as follows:

Tutorial of how to get started with DQ - https://docs.aws.amazon.com/glue/latest/ug/tutorial-data-quality.html
Blog in Depth breakdown of DQ along with guide - https://aws.amazon.com/blogs/aws/join-the-preview-aws-glue-data-quality/

AWS
SUPPORT ENGINEER
answered a year ago
  • I have created the same rule as you sent, when run the "evaluate rulset" it shows: 2023-05-22 14:33:35,621 ERROR [main] glue.ProcessLauncher (Logging.scala:logError(94)): Exception in User Class java.lang.RuntimeException: Failed to fetch data. Please check the logs in CloudWatch to get more details. at d.com.amazonaws.services.glue.ml.dq.runner.AbstractDataQualityTaskRunner.loadData(AbstractDataQualityTaskRunner.scala:90) at d.com.amazonaws.services.glue.ml.dq.runner.DataQualityEvaluationRunner.execute(DataQualityEvaluationRunner.scala:58) at d.com.amazonaws.services.glue.ml.dq.runner.AbstractDataQualityTaskRunner.run(AbstractDataQualityTaskRunner.scala:38) at d.com.amazonaws.services.glue.ml.dq.runner.DataQualityEvaluationRunner$.main(DataQualityEvaluationRunner.scala:146) at DataQualityRulesetEvaluationScript$.main(DataQualityRulesetEvaluationScript.scala:5) at DataQualityRulesetEvaluationScript.main(DataQualityRulesetEvaluationScript.scala) ... Caused by: java.lang.IllegalArgumentException: No group with name <host> at java.util.regex.Matcher.getMatchedGroupIndex(Matcher.java:1316) ... 2023-05-22 14:33:35,624 ERROR [main] glue.ProcessLauncher (Logging.scala:logError(73)): Exception in User Class: java.lang.RuntimeException : Failed to fetch data. Please check the logs in CloudWatch to get more details.

    No group with name <host> what means?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions