Skip to content

fix: normalize column-level meta to config.meta for dbt 1.9+#324

Open
dtaniwaki wants to merge 1 commit intoz3z1ma:mainfrom
dtaniwaki:fix/column-config-meta
Open

fix: normalize column-level meta to config.meta for dbt 1.9+#324
dtaniwaki wants to merge 1 commit intoz3z1ma:mainfrom
dtaniwaki:fix/column-config-meta

Conversation

@dtaniwaki
Copy link

Thanks for maintaining this project! I'd appreciate your review on this small fix.

Problem

In dbt 1.9+, column-level meta should be stored under config.meta rather than as a top-level meta property (see dbt deprecations). The previous logic in
_sync_doc_section was doing the opposite — it was merging config.meta into the top-level meta, which perpetuated the deprecated pattern.

Solution

When dbt v1.10+ is detected and a column has a top-level meta dict, normalize it by moving it into config.meta and removing the top-level meta key. This aligns the written YAML with dbt's recommended
structure going forward.

Before:

columns:
  - name: user_id
    meta:
      pii: true

After:

columns:
  - name: user_id
    config:
      meta:
        pii: true

The change also removes the now-unnecessary bidirectional merge logic, simplifying the code significantly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant