Area: Observability Issues
Sub-Area: BigQuery Assertion Connection Errors
Applies to: Cloud
Issue
All BigQuery assertions fail with a source connection error. The BigQuery ingestion source recipe sets start_time at the top level of source.config and also under usage (usage.start_time).
DataHub Cloud builds the BigQuery connection for an assertion from a BigQuery ingestion source recipe. It parses the whole source.config. If the recipe fails validation, the connection can't be built, and every assertion tied to that source fails.
The same applies to end_time, bucket_duration and max_query_duration. Each must be set only at the top level of source.config.
Error Messages
Unable to retrieve valid connection for Data Platform with urn urn:li:dataPlatform:bigqueryCaught error of type <type> when attempting to evaluate assertion with urn urn:li:assertion:<assertion-urn> and properties {...}- In the recipe validation, when you run the recipe:
start_time is set both at the top level and under usage. The top-level start_time is the only valid setting - remove usage.start_time from your recipe.
You Might Be Asking
- Why did my BigQuery assertions start failing with a source connection error?
- Is this a credential or permissions problem with my BigQuery service account?
- Why doesn't re-entering my BigQuery credentials fix the assertion failures?
- Can I set a different
start_timefor usage than for the rest of the BigQuery recipe? - Will scheduled BigQuery ingestion runs also fail?
Cause
The BigQuery source config rejects a recipe that sets start_time, end_time, bucket_duration or max_query_duration both at the top level and under usage.
When the assertion executor can't parse the recipe, it logs "Failed to extract connection details from BigQuery recipe!" and returns no connection. The freshness, SQL and field evaluators then raise "Unable to retrieve valid connection for Data Platform with urn
You can't set a separate start_time for usage. The top-level start_time applies to lineage, usage and operations together. The usage.start_time, usage.end_time and usage.bucket_duration settings are deprecated.
If only usage.start_time is set and the top-level start_time is not, the value moves to the top level and a deprecation warning is logged. Only the case where both are set is an error.
This is not a credential or permissions problem. Re-entering BigQuery credentials does not fix it, because the recipe still fails to parse.
Solution
Remove usage.start_time from each affected BigQuery ingestion source recipe. Keep the top-level start_time. You don't need to change service account credentials or permissions.
-
Find the affected sources. Open each BigQuery ingestion source. A source is affected if its recipe sets a field both at the top level and under
usage. If many sources share one recipe template, check all of them.# Conflicting configuration: fails validation source: type: bigquery config: start_time: '<your start time>' # top-level start_time usage: start_time: '<other value>' # conflicts with the top-level value project_ids: - <your-gcp-project-id> -
Remove
usage.start_time. Keep the top-levelstart_time. Do the same for any other field you set in both places. Bothusage: {}and removing theusageblock validate.source: type: bigquery config: start_time: '<your start time>' usage: {} project_ids: - <your-gcp-project-id> -
Save the recipe for each affected source.
-
Check the assertions. Open the affected datasets and confirm the assertions produce results instead of source connection errors.
-
Check scheduled ingestion. A recipe that sets the same field in both places also fails config validation when ingestion runs, so scheduled ingestion for that source fails until you fix the recipe.
If assertions still fail after you fix the recipes, contact DataHub Support.