-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow configuring snapshot table column names #145
Conversation
Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the dbt-postgres contributing guide. |
pyproject.toml
Outdated
@@ -54,7 +54,7 @@ path = "dbt/adapters/postgres/__version__.py" | |||
|
|||
[tool.hatch.envs.default] | |||
dependencies = [ | |||
"dbt-adapters @ git+https://github.com/dbt-labs/dbt-adapters.git", | |||
"dbt-adapters @ git+https://github.com/dbt-labs/dbt-adapters.git@snapshot_column_names", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Friendly reminder to point back to main
before merging.
@@ -2,12 +2,14 @@ | |||
{% macro postgres__snapshot_merge_sql(target, source, insert_cols) -%} | |||
{%- set insert_cols_csv = insert_cols | join(', ') -%} | |||
|
|||
{%- set stcn = config.get("snapshot_table_column_names") or get_snapshot_table_column_names() -%} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get_snapshot_table_column_names
is a new macro in dbt-adapters
. We will need to bump the pin on the lower bound of dbt-adapters
in dbt-postgres
.
I noticed that there was a new requirement on dbt-adapters
in this PR, but there's no associated pin adjustment.
resolves #144
Problem
Supports configuration of snapshot column names provide by dbt-labs/dbt-core#10608
Solution
Update merge.sql to use modified columns names.
Checklist