Skip to content

dbt: BigQuery wildcard sources (events_*) never produce dbt lineage #38703

Done

Description

@ulixius9

Affected module

Ingestion Framework (dbt)

Describe the bug

A dbt source whose identifier is a BigQuery wildcard table, such as GA4's events_*, never produces dbt lineage. Every model that selects from it logs:

Unable to find the table 'my_bq.my-project.analytics_123.events_*' in OpenMetadata. Please check if the table exists and is ingested in OpenMetadata ...

The parent is then dropped from the model's upstream list, so its dbt lineage edges are lost.

This happens even with shardedTables enabled, where BigQuery metadata ingestion catalogs the shards as events_yyyymmdd and events_intraday_yyyymmdd (#16640 / #36867, backported to 2.0 in #37002). The cause is that dbt looks up source identifiers literally (#35683): * is escaped, so the lookup asks for a table named exactly events_*. The BigQuery resolver's wildcard and shard-family matching never runs, and create_dbt_lineage's wildcard fan-out never sees the upstream.

To Reproduce

  1. Ingest a BigQuery project that has a GA4 export (events_YYYYMMDD and events_intraday_YYYYMMDD shards), with or without shardedTables.
  2. Declare a dbt source ga4.events with identifier: events_*, and a model that selects from it.
  3. Run dbt ingestion against that BigQuery service.
  4. The model has no dbt lineage from any events_… table, and the log shows the warning above.

Expected behavior

A BigQuery wildcard source is an upstream of every table it reads (both shard families, plus any ordinary events_… table), as the lineage workflow already does for events_* in query logs. When the match overflows the catalog-wildcard limit, the prior lineage is kept and a warning is reported. Tests and exposures still need exactly one table, and engines without wildcard tables keep treating the identifier literally.

Version

  • OpenMetadata: 2.0.10 (also on main)
  • openmetadata-ingestion: 2.0.10

Activity

  1. added
    bug
    on Nov 25, 2026
  2. moved this to In Review / QA 👀 in Shippingon Nov 26, 2026
  3. moved this from In Review / QA 👀 to Done ✅ in Shippingon Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Ingestionbug

    Type

    No type

    Projects

    • Status
      Done ✅
    • Status
      Done ✅

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions