Feature Request: Allow CustomSQLQuery test cases to inherit column-level tags and glossary terms
Is your feature request related to a problem? Please describe.
Yes. Currently, when you create a DQ Table Test Case of type CustomSQLQuery, the created test case inherits only the table-level glossary terms and tags. It completely ignores the metadata of the actual columns being queried, which causes us to lose the granular context of what the query is actually validating.
Describe the solution you'd like
Let's say we have a table called dim_customers with the following metadata:
Table-level:
- Glossary Term: GlossaryTerm1
- Tag: Tag1
Column-level (Column 1: email):
- Glossary Term: GlossaryTerm2
- Tag: Tag2
Column-level (Column 2: account_status):
- Glossary Term: GlossaryTerm3
- Tag: Tag3
Custom SQL Query used in the test:
SELECT email, account_status
FROM dim_customers
WHERE account_status = 'INACTIVE' AND email IS NULL
Current behavior: The created test case only inherits the table-level metadata (GlossaryTerm1, Tag1). The rich column-level context is ignored.
New requested behavior: The test case should inherit the metadata of the specific columns referenced in the query (GlossaryTerm2, Tag2, GlossaryTerm3, Tag3). Ideally, it should retain the table-level metadata as well to give a complete picture of the test's scope.
Describe alternatives you've considered
If inferring the column names dynamically from a user-inserted SQL query is not possible (or conflicts with how Table Test Cases are architected), we propose creating a similar but distinct test case type (e.g., ColumnsCustomSQLQuery).
This would be a column-level test case where:
The user indicates the relevant columns in a new parameter field.
The user writes their custom SQL query.
The resulting test case successfully inherits both the table-level as well as the column-level tags and glossary terms of the specified columns.
Additional context
This feature is needed for maintaining granular data quality observability. Relying solely on table-level inheritance means column-specific compliance or sensitivity tags (like PII) are dropped from the test case results.
Pre-submission checklist
- [x] I searched for duplicate feature requests.
up
up
up