-
Notifications
You must be signed in to change notification settings - Fork 119
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
Support for COPY INTO #190
Conversation
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.
@allisonwang-db Thanks for working on this!
Could you fix the linter issue by running tox -e black
?
Could you also add an item in CHANGELOG.txt
for this?
Otherwise, LGTM.
@use_profile("databricks_cluster") | ||
def test_databricks_cluster(self): | ||
self.test_copy_into() | ||
|
||
@use_profile("databricks_sql_endpoint") | ||
def test_databricks_sql_endpoint(self): | ||
self.test_copy_into() |
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.
Does this feature not support UC?
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.
I tested against a UC cluster and I don't think UC can support this test case:
- UC does not allow the creation of parquet tables (only Delta is supported)
- UC does not allow access to the underlying path of a managed Delta table (so we can't get the source in the test)
But UC should support COPY INTO: https://docs.databricks.com/ingestion/copy-into/unity-catalog.html
09fa878
to
7e16e2c
Compare
Thanks! merging. |
@ueshin does this support the inline credentials that newer DBRs support for COPY INTO? |
@bilalaslamseattle Yes, seems so, if you mean this: dbt-databricks/dbt/include/databricks/macros/copy_into.sql Lines 27 to 33 in 1079d25
|
@bilalaslamseattle Yes, it should support the inline credentials (for the source table). |
resolves #41
Description
This PR adds a macro
databricks_copy_into
to support the COPY INTO command. You can use it with dbt run-operation:Checklist
CHANGELOG.md
and added information about my change to the "dbt-databricks next" section.