Skip to main content
Bird & Bear
Menu
← All articles

How to Connect BigQuery to Knowledge Catalog: Automatic Sync From Pipelines, Plus Adding Business Context by Hand

bigquery ai googlecloud
How to Connect BigQuery to Knowledge Catalog: Automatic Sync From Pipelines, Plus Adding Business Context by Hand

Two separate things need setting up in BigQuery. The automatic path syncs metadata from a Dataform pipeline to Knowledge Catalog on its own, every time the pipeline runs. The manual path is for attaching business context by hand: ownership, sensitivity, glossary terms, on a table that isn’t managed by a pipeline at all. Most teams need both.

Before you start

Knowledge Catalog runs on the Dataplex API under the hood (the product was renamed, the API name wasn’t). The setup starts with enabling three APIs on your project:

gcloud services enable \
  dataplex.googleapis.com \
  bigquery.googleapis.com \
  datacatalog.googleapis.com

For the business-context work specifically, you’ll want Dataplex Catalog Admin (roles/dataplex.catalogAdmin) on whichever project holds your Knowledge Catalog resources, plus BigQuery Data Editor on the project with the tables you’re documenting. If you set up your BigQuery project yourself, you likely already have enough access. This matters more for a data governance lead setting permissions for a wider team.

The automatic path: metadata that syncs from a Dataform pipeline

If your tables are built through BigQuery’s Dataform-powered pipelines, you define the metadata once. It lives in the same SQLX file as the transformation logic. It syncs to Knowledge Catalog automatically every time the pipeline runs successfully. There’s no separate documentation step, and no wiki page that drifts out of date the first time someone changes a column.

The basic version, table and column descriptions, uses the description and columns fields in the config block. This works whether or not you’re thinking about Knowledge Catalog at all:

config {
  type: "table",
  description: "Daily aggregated purchase events by customer.",
  columns: {
    customer_id: "Hashed customer identifier, matches the CRM's external ID.",
    order_value: "Order value in the transaction's local currency, pre-tax.",
    items: {
      description: "Line items in the order.",
      columns: {
        item_name: "Product name at time of purchase.",
        item_brand: "Brand attached to the product SKU.",
      },
    },
  },
}

These sync to Knowledge Catalog as the entry’s Overview aspect the moment the pipeline completes. It’s a genuinely high-leverage five minutes for a new table. It’s the difference between an analyst (or an AI agent) guessing what order_value means from the column name, and knowing for certain it’s pre-tax.

For richer context specifically aimed at Knowledge Catalog, there’s a metadata block (currently in Preview) that goes beyond column descriptions:

config {
  type: "table",
  metadata: {
    overview: "Canonical source for daily purchase-level revenue reporting. Used by the finance MMM model and the exec revenue dashboard.",
    extraProperties: {
      generic: {
        system: "BigQuery",
        type: "table",
      },
    },
  },
}

The overview field is where you put the thing a table’s column names can never tell you. It’s not what the data is, but what it’s for, and who actually relies on it. That’s the reasoning behind Knowledge Catalog itself. An AI agent (or a new hire) working from a bare schema can guess at what a column means and get it wrong. An agent working from a documented, business-context-aware catalog entry has something real to ground itself in.

Where the sync shows up: Dataform also publishes any assertion results (your data quality checks) to Knowledge Catalog’s data quality scorecard on every run. Each run overwrites the previous scorecard rather than keeping history, so it reflects your pipeline’s current state, not a trend line. You can find the synced entries by searching Knowledge Catalog for the @dataform system entry group, or by filtering for entry type dataform-code-asset with the aspect filter aspect:dataplex-types.global.dataform-code-asset.type=WORKFLOW. You can also check a specific run’s metadata publish status from the pipeline’s Executions tab in the BigQuery console (Explorer → Pipelines).

The manual path: adding business context to tables a pipeline doesn’t touch

Not everything worth documenting comes out of a Dataform pipeline. Plenty of BigQuery estates have tables that were loaded some other way, or that predate the pipeline entirely. For those, Knowledge Catalog’s business glossary and aspects do the same job by hand.

Set up a business glossary first, since it’s reusable across every table you document afterward. In the console, go to Knowledge Catalog → Glossaries → Create business glossary. Give it a name and a location, then build out categories (e.g. “Sales Metrics,” “Supply Chain & Logistics”) and add terms underneath them with real definitions, not just a label. Define a term like “Gross Merchandise Value” properly once (“the total value of merchandise sold over a given period, before deduction of any fees or expenses”).

Then link glossary terms directly to columns, so the definition sits where someone actually finds it. Search Knowledge Catalog for your table, open its Schema tab, select the relevant column, click Add business term, and pick the glossary term. Now anyone finding that column via search sees the agreed definition, not just a raw column name.

For structured, repeatable metadata beyond a glossary term, such as an owner, a sensitivity level, or a review date, define a custom aspect type once and reuse it everywhere. Under Knowledge Catalog → Metadata types → Aspect types → Create (Custom tab), you can define fields like:

  • Data Steward (Text, required)
  • Data Sensitivity (Enum: Public / Internal / Confidential)
  • Last Review Date (Date, optional) Once that aspect type exists, attach it to any table entry from its Details tab (Add next to Optional aspects, select the aspect type, fill in the fields, Save). This turns “who owns this table” into something searchable and enforceable. It’s the same job PII and sensitivity tagging does for governance, just extended to ownership and review cadence.

What to do about it

If you’re already running Dataform pipelines in BigQuery, start with the cheap win. Add description and columns to your existing SQLX config blocks. It takes a few minutes per table, and it’s already syncing automatically. You’re just not using it yet. Add the metadata.overview field for your handful of genuinely load-bearing tables: the ones feeding a dashboard leadership actually looks at, or a model something downstream depends on. Don’t try to do it for everything at once.

For tables outside your pipelines, don’t try to cover everything at once either. Stand up one business glossary with the handful of terms that cause the most cross-team confusion, and prioritise attaching a Data Steward aspect to whatever table gets the most “who owns this?” Slack messages. The goal isn’t full catalog coverage on day one. It’s making the next person (or agent) who touches your data not have to guess.

Newsletter

Occasional notes on data, tracking & AI-readiness

No spam, no growth-hacking. Just an email when there's something worth reading.