Area: Observability
Sub-Area: Assertions
Applies to: Cloud
Issue
Data quality assertions fail to create, fail to run, or do not show up in the DataHub Cloud UI. This covers Freshness, Volume, Column, Custom SQL and Schema assertions.
Common error messages:
Monitor limit exceeded. Current monitors: <N>, attempting to create: <N>, maximum allowed: <N>. Cannot create new monitor entity.Unable to retrieve valid connection for Data Platform with urn <urn>Missing connection URN for SQL assertion evaluation
You Might Be Asking
- Why is the Create button missing or disabled on the Quality tab?
- Why can't I create a Custom SQL assertion?
- Why does my assertion fail to run?
- What does "Monitor limit exceeded" mean?
- What does "Unable to retrieve valid connection for Data Platform" mean?
Cause
By default, the Asset Owners metadata policy gives owners the Edit Assertions and Edit Entity privileges. It does not give them the Edit Monitors privilege. Edit Entity does not cover monitors. Before an owner can create an assertion, an admin must grant the Edit Monitors or Manage Monitors privilege.
- Create button missing. The button is not shown when assertion monitors are not enabled for your instance. This is a server-side setting. Contact DataHub Support.
- Create button disabled. You lack the Edit Assertions and Edit Monitors privileges on the dataset, or the dataset's platform does not support assertion monitoring.
- Custom SQL not allowed. Custom SQL assertions also need the Edit SQL Assertion Monitors privilege or the platform Manage Monitors privilege. A general "all privileges on the entity" grant does not count. An admin grants these privileges through a policy. Policies can differ between instances. Check which policies apply to you. For more detail, see Custom SQL assertions.
- Platform not supported for the assertion type. Active-query assertions work only on Snowflake, Redshift, BigQuery and Databricks. Custom SQL and Column Value assertions need active query. On other platforms, Freshness, Volume, Column Metric and Schema assertions run in ingestion-driven mode, using ingested Operations, dataset profiles and schema. Results there refresh only as often as that metadata is ingested.
-
No usable ingestion source connection. Assertions run their queries through the ingestion source that ingested the table. They use the connection and the configured user or role of that source. There is no separate assertion connection or role. The error
Unable to retrieve valid connection for Data Platform with urn <urn>means the executor could not build a connection for the dataset. Either the executor found no ingestion source for the dataset, or the source that ingested it runs from the CLI rather than being set up in the DataHub UI. The<urn>can be a data platform URN or a dataset URN. -
Missing connection URN.
Missing connection URN for SQL assertion evaluationis a different error. It means the assertion reached the executor with no connection URN at all. It does not mean the dataset has no ingestion source. Contact DataHub Support. - Monitor limit. The default maximum is 1000 monitors, set on the server side.
Solution
-
Find the Create button. Open the dataset, click the Quality tab, then click Create.
- If the button is missing, contact DataHub Support.
- If it is disabled, ask an admin to grant you the Edit Assertions and Edit Monitors privileges through a policy. Also check that the platform is one the assertion type supports. For Custom SQL, the admin must also grant Edit SQL Assertion Monitors.
-
Create a Custom SQL assertion. On the Quality tab, click Create and choose Custom. Set the evaluation schedule, enter the SQL query, choose the condition, and configure actions. Click Next, add a description, then click Save. There is no step to pick a connection. DataHub uses the connection of the ingestion source that ingested the table.
-
Check the query.
- Use the fully qualified table name.
- Make sure the user or role configured in the ingestion source can read the table.
- The query must return one row with one numeric column (integer or float). The condition you choose under "Pass if resulting value" decides pass or fail. A result of 0 has no built-in meaning.
- If several ingestion sources ingested the same table, the executor uses the one that ingested the table's dataset properties. Your DataHub representative can change this.
-
Fix "Unable to retrieve valid connection". Confirm the table was ingested by an ingestion source set up in the DataHub UI, not one run from the CLI. See Source system selection.
-
Test the query. Click Try it out in the builder. This button is optional. It is not available for sources that run on a Remote Executor. The UI then says "Trying assertions is not supported for sources with remote executors."
-
Review run results. Open the assertion to see its Summary, Notes and Settings tabs. To find assertions that fail often, open the Data Health Dashboard under Observe, go to the Assertions tab, use the By Assertion view, set a time range such as Last 7 Days, and set Results to At least one failure.
-
Fix "Monitor limit exceeded". The limit is set on the server side. Contact DataHub Support to review it.
-
Assertions missing after an upgrade. Contact DataHub Support.
Related Documentation
Tags: assertions, data-quality, monitoring, troubleshooting