- Newest
- Most votes
- Most comments
The error you're encountering with AWS Glue Data Quality is related to how you're using the CustomSQL rule type. Based on the information provided, there are a few key points to address:
-
For Row Level CustomSQL rules, you need to select at least one column from your primary table that matches the input dataset. This is required for AWS Glue Data Quality to provide row-level results.
-
Your working query
CustomSql "select count(*) from primary" between 10 and 100is valid for OVERALL CustomSQL DQ rule, but not for Row Level Custom SQL. This explains why it works while your column-specific query fails. -
When using CustomSQL with columns, you should ensure that:
- You select a Primary Key from your table or a set of columns that form a composite key
- You only select keys from your primary table (not from reference tables)
- The columns you select in your SQL query must exist in the input dataset
To resolve this issue, try the following:
-
Verify that the columns "Col1" and "Col2" actually exist in your table with exact spelling and case
-
Ensure your rule is properly formatted with the correct syntax. For example:
Rules = [CustomSQL "select Col1, Col2 from primary" with threshold > 0]
-
Make sure you're using double quotes consistently in your rule definition, not single quotes
-
If you're trying to perform row-level validation, modify your query to include a WHERE clause that filters for the condition you want to check
-
If you're still encountering the same error, try using a simpler query first to test if the issue is with specific columns or with the CustomSQL functionality in general
The "NoClassDefFoundError" suggests there might be a dependency issue with the jsqlparser library that AWS Glue Data Quality uses to parse your SQL query. This could be related to how your specific query is being processed.
Sources
Troubleshooting AWS Glue Data Quality errors - AWS Glue
CustomSQL - AWS Glue
answered a year ago
Relevant content
asked a year ago
asked 9 years ago
