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

WIP: changed the macro to work with snowflake #189

Closed

Conversation

nehiljain
Copy link

No description provided.

@clrcrl clrcrl self-requested a review February 11, 2020 14:43
@clrcrl
Copy link
Contributor

clrcrl commented Feb 11, 2020

Hey @nehiljain — I'll dedicate some time on Friday to take a look at this

@clrcrl
Copy link
Contributor

clrcrl commented Feb 14, 2020

Hi Nehil! Thanks for this PR!

I had a poke around here this afternoon, and it turns out that since originally writing this code in 2018, we've made some improvements in dbt that simplifies the code needed for a materialization. I think rather than working at the edges of this code to get it to work across multiple warehouses, it's time for a refactor! I wrote up my thoughts in dbt-labs/dbt-labs-experimental-features#32.

As a result, I'm going to close this PR (as it does indeed break the Redshift implementation). If you'd like to help out on dbt-labs/dbt-labs-experimental-features#32, drop a note in the comments of that issue to let me know.

In the meantime, all is not lost! You can leverage this macro by adding it to your own project directly! Simply:

  1. Copy the code into a file in the macros/ directory
  2. Within this code, replace dbt_utils.get_period_boundaries with <project_name>.get_period_boundaries (since you want to use the get_period_boundaries macro in your project rather than in dbt_utils), grab your project name from your dbt_project.yml file (next to name:).

Alternatively, you can also maintain a fork of dbt-utils and install that in your project, but I'd recommend the above process.

Let me know if you encounter any issues!

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.

2 participants