-
Notifications
You must be signed in to change notification settings - Fork 240
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
Enable create or replace sql syntax #125
Conversation
With Delta we can do an atomic operation to replace the current version of the table, with a new version using the create or replace syntax.
Going to figure out why Circle didn't run tests against this PR |
dac74ac
to
880db89
Compare
b89349a
to
b5b6936
Compare
Hey @Fokko, I think the issue here is that the CI jobs ran against the fork in the "Fokko" Circle organization as opposed to the "Fishtown Analytics" ones (which have the appropriate env vars for sandbox Databricks connection). I believe this is fixable if you go into the CircleCI Project Settings for the "Fokko" organization, and on the Overview tab, click |
@jtcohen6 Sorry for the late reply, was kinda busy. I couldn't find the page that you're referring to. I've unfollowed the project in CircleCI, let's see if that fixes anything. |
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.
@Fokko This looks great! Thanks for getting the CI working.
If you're up to do it, I'd support swapping out the existing {% if config.file_format == 'delta' %}
checks in incremental + snapshot to use relation.is_delta
instead. That doesn't need to happen in this PR, though.
@jtcohen6 I've reverted the incremental.sql as well. The |
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.
Fair enough, it was a nice thought :) I'm quite happy with this!
@Fokko could you add a changelog entry (and add yourself to the list of contributors)? I'd love to get this in before v0.19.0.
The failing test seems to be an unrelated issue with set
statements + the new SQL Analytics endpoints. I'll open a separate PR to disable the incremental step for that test suite.
@jtcohen6 thanks! I've added myself to the CHANGELOG. And! |
With Delta we can do an atomic operation to replace the current version of the table, with a new version using the create or replace syntax.
For delta, and only delta, we can use the
CREATE OR REPLACE
syntax to atomically replace the table. This will make sure that the table is still available all the time.resolves #124
Description
Checklist
CHANGELOG.md
and added information about my change to the "dbt next" section.Ran the tests: