Skip to content

Update docs and samples to use meta for alias and expression#399

Merged
b-per merged 1 commit intomainfrom
docs/move-alias-expression-to-meta
Mar 2, 2026
Merged

Update docs and samples to use meta for alias and expression#399
b-per merged 1 commit intomainfrom
docs/move-alias-expression-to-meta

Conversation

@b-per
Copy link
Contributor

@b-per b-per commented Feb 27, 2026

Summary

  • Move alias and expression column properties under meta in sample_sources/snowflake.yml
  • Add documentation in the README spec section showing the meta pattern for custom column properties

PR #386 updated the code to read alias and expression from column.meta, and the integration tests were updated accordingly, but the sample sources and README still showed the old top-level custom key format.

Ref: dbt-labs/dbt-core#12496

@b-per b-per requested a review from jeremyyeo as a code owner February 27, 2026 13:00
Copy link

@graciegoheen graciegoheen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to also nest meta under config!

Move `alias` and `expression` column properties under `meta` in the
sample sources and add documentation in the README spec section.

The code (PR #386) already reads these from `meta`, and the integration
tests were updated, but the samples and README still showed the old
top-level custom key format.

Resolves dbt-core#12496
@b-per b-per force-pushed the docs/move-alias-expression-to-meta branch from 7aafb67 to e8b4822 Compare February 27, 2026 13:40
@b-per b-per requested a review from graciegoheen February 27, 2026 14:43
Copy link

@graciegoheen graciegoheen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@b-per b-per merged commit e34c96e into main Mar 2, 2026
6 checks passed
@moseleyi
Copy link

moseleyi commented Mar 8, 2026

@b-per this doesn't seem to work for partition definitions, for example this fails:

partitions: &s3_parition_new
  - name: partition_hour
    data_type: timestamp
    config:
      meta:
        expression: TO_TIMESTAMP(SUBSTR(metadata$filename, 3, 13), 'YYYY/MM/DD/HH24')

I still have to use

partitions: &s3_parition_new
  - name: partition_hour
    data_type: timestamp 
    expression: TO_TIMESTAMP(SUBSTR(metadata$filename, 3, 13), 'YYYY/MM/DD/HH24')

@b-per
Copy link
Contributor Author

b-per commented Mar 9, 2026

Thanks for flagging this @moseleyi! You're right — the meta-based approach wasn't applied to partition expressions.

I've created #400 to track it and #401 with the fix.

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.

3 participants