Skip to content
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

initial implementation of redshift dbt_clone macros and test design a… #505

Merged
merged 9 commits into from
Jul 11, 2023

Conversation

McKnight-42
Copy link
Contributor

@McKnight-42 McKnight-42 commented Jun 22, 2023

resolves #504

Description

adding some default redshift versions of dbt_clone macros and pulling in test for if cloning is not valid

Checklist

@McKnight-42 McKnight-42 requested a review from a team as a code owner June 22, 2023 19:56
@McKnight-42 McKnight-42 self-assigned this Jun 22, 2023
@cla-bot cla-bot bot added the cla:yes label Jun 22, 2023
@McKnight-42 McKnight-42 requested a review from aranke June 22, 2023 20:01
@@ -0,0 +1,3 @@
{% macro redshift__can_clone_table() %}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

for adapters who's values match that of default False do we want to go ahead and create adapter specific macros now incase we can swap the flag later or is this something we can remove for now? @aranke @ChenyuLInx

@McKnight-42
Copy link
Contributor Author

running

dbt build --target-path target_name
dbt clone --state target_name --target alt_target_name --target-path alt_target_name

as per suggested by @aranke does appear to make the view creation in the alt target happen

Copy link
Member

@aranke aranke left a comment

Choose a reason for hiding this comment

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

LGTM, verify that views are created in new schema.

@McKnight-42 McKnight-42 merged commit 0024261 into main Jul 11, 2023
25 checks passed
@McKnight-42 McKnight-42 deleted the feature/dbt-clone-rs branch July 11, 2023 21:17
abbywh pushed a commit to abbywh/dbt-redshift that referenced this pull request Oct 11, 2023
dbt-labs#505)

* initial implementation of redshift dbt_clone macros and test design attempts

* remove dbt_clone macros that are unneeded

* add clean_up method to drop alt schema names after tests run

* change pointer back to main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ADAP-652] [Feature] dbt-redshift Cloning from Production
3 participants