Area: Ingestion Issues
Sub-Area: BigQuery Source Configuration — Usage and Lineage Extraction
Issue
During BigQuery ingestion, users may encounter a warning indicating that query logs returned empty results for all scanned regions (e.g., "BQ query log empty for all scanned regions"). The ingestion run is marked as partially succeeded, and usage statistics and lineage derived from query logs are not populated. This warning can be confusing because dataset metadata (schemas, tables, columns) is ingested successfully — only the query-log-based usage and lineage data is affected. Users often suspect a region misconfiguration, but the root cause may simply be that no BigQuery jobs ran in the project during the ingestion window.
Error Messages
BQ query log empty for all scanned regionsINFORMATION_SCHEMA.JOBS returned empty rows for scanned region(s): region-<your-region>
You Might Be Asking
- Does this warning mean my BigQuery region configuration is wrong?
- Why does BigQuery ingestion partially succeed but show no usage or lineage data?
- How do I know if the empty query log warning is a real error or just a period of inactivity?
- Should I set
region_qualifiersexplicitly for each BigQuery project?
Solution
Use the following steps to diagnose whether the warning is caused by inactivity or a genuine region misconfiguration, and apply the appropriate fix.
-
Distinguish inactivity from misconfiguration.
If query logs return results for a given project on some ingestion runs but not others, the region configuration is likely correct. The warning accurately reports that no BigQuery jobs ran during those specific ingestion windows. Review run history across several days to identify a pattern — for example, a project that only receives traffic on certain days of the week will produce this warning on quiet days.
If query logs never return results for a project across many consecutive runs, suspect a region misconfiguration and proceed to the steps below.
-
Verify the dataset's actual storage region in BigQuery.
In the Google Cloud Console, navigate to the BigQuery project in question and check the location of its datasets. Note whether datasets are stored in:
- A single region (e.g.,
europe-west4,us-east4) - A multi-region (e.g.,
EU,US)
This distinction is critical: querying
INFORMATION_SCHEMA.JOBSforregion-europe-west4will not return data for datasets stored in theEUmulti-region, and vice versa. - A single region (e.g.,
-
Option A (Recommended): Enable automatic region discovery.
Add
region_qualifiers_auto_discovery: trueto your BigQuery ingestion recipe. DataHub will automatically detect the correct region(s) from each project's dataset locations, eliminating the need to maintain a manual list of regions.source: type: bigquery config: region_qualifiers_auto_discovery: true -
Option B: Set region qualifiers explicitly.
If you prefer to specify regions manually, set the
region_qualifiersparameter to match the actual storage location(s) of your datasets. Use the correct qualifier format as shown below.For a single-region dataset (e.g.,
europe-west4):source: type: bigquery config: region_qualifiers: - "region-europe-west4"For a multi-region dataset (e.g., EU multi-region):
source: type: bigquery config: region_qualifiers: - "EU"For projects spanning multiple regions:
source: type: bigquery config: region_qualifiers: - "EU" - "region-us-east4" -
Re-run ingestion and verify.
After updating the recipe, trigger a new ingestion run and confirm that usage and lineage data is being populated for the affected project. If the warning only appears on runs coinciding with low-traffic periods, no configuration change is needed — the warning is expected behavior.
Additional Notes
- The empty query log warning does not affect core metadata ingestion. Dataset schemas, tables, columns, and other structural metadata are ingested independently of query log extraction.
- A common mistake is confusing the
EUmulti-region qualifier with single-region qualifiers likeregion-europe-west4. These are distinct BigQuery locations and must be specified correctly. - By default, the BigQuery connector scans
region-usandregion-eu. Projects stored in specific single regions or non-default multi-regions will require explicitregion_qualifiersconfiguration or auto-discovery. - The
region_qualifiers_auto_discoveryoption is the recommended approach for environments with multiple projects across varied regions, as it removes the maintenance burden of keeping the region list up to date. - If a project is low-traffic or batch-oriented (e.g., jobs only run on certain days), intermittent empty query log warnings are expected and can be safely ignored as long as other runs successfully capture usage data.
Related Documentation
Tags: bigquery, ingestion, query-logs, usage-extraction, lineage, region-qualifiers, INFORMATION_SCHEMA, partial-ingestion, warning, region-configuration