Skip to content

metabase.semantic_type not being synced for dbt 1.10 for new "meta" yml under "config" #335

@patygold

Description

@patygold

After upgrading dbt-core to 1.10.8 and dbt-metabase library to 1.6.1, the sync of the "metabase.semantic_type" to Metabase stopped working.

If I write my column such as

    columns:
      - name: booking_id
        data_tests:
          - not_null
          - unique
        description: The id of the booking
        config:
          meta:
            metabase.semantic_type: type/PK

This doesn't work (The Semantic Type is empty)

Image

Changing this to (old version of dbt)

    columns:
      - name: booking_id
        data_tests:
          - not_null
          - unique
        description: The id of the booking
        meta:
          metabase.semantic_type: type/PK

Then this worked as before, with the semantic type as "Entity Key"
Image

I'm using the library in Python (v3.11.10), defining the the export as such


    dbt_metabase = DbtMetabase(
        manifest_path=MANIFEST_FILE,
        metabase_url=metabase.host,
        metabase_api_key=metabase.api_key,
        http_timeout=60,
    )

    schema_filter, model_filter = get_filters(config)

    try:
        dbt_metabase.export_models(
            metabase_database=config.metabase_database,
            skip_sources=True,
            sync_timeout=0,
            schema_filter=schema_filter,
            model_filter=model_filter,
        )
    except Exception as e:
        context.log.error(f"Errors in metadata sync: {e}")

No errors are being raised though, just the Semantic Type in Metabase is not being updated for all new columns.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions