This repository was archived by the owner on Sep 2, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Allow configuring snapshot table column names #145
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
mikealfare
previously approved these changes
Sep 18, 2024
pyproject.toml
Outdated
[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.
mikealfare
reviewed
Sep 18, 2024
{% 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.
colin-rogers-dbt
approved these changes
Sep 20, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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