-
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
Help with an example of the materialization type clone
#832
Comments
Here's what I've tried: test_table.sql
test_table_clone.sql
dbt run --target databricks-dev-local --select test_table
dbt run --target databricks-dev-local --select test_table_clone
Question - why is it looking for the state manifest? Is there a way to ignore the state manifest and create the clone as long as the upstream task was successful? We often have downstream models running in separate container environments that don't have awareness of the upstream models' state manifests because the success/failure state is managed outside of dbt. |
I'm reasonably certain that we don't actually support clone as a materialization, but as support for dbt clone |
In theory it seems like a custom materialization could work that uses cloning. I got pretty far with this example below based on Would this general direction potentially work as a model materialization type? Or, what would it take to make the clone.sql logic work with models and not just the CLI? Looking for guidance on which direction makes the most sense.
|
First we'd have to remove the blockers to custom materializations (another open ticket) :/. I suggest raising the issue of clone as a supported materialization with dbt Labs, because your use case seems reasonable to me. |
I'm new to custom materializations and was going off this doc which implies that custom materializations are supported: https://docs.getdbt.com/guides/create-new-materializations?step=1 Could you elaborate on the blockers? Happy to open another ticket and/or contribute to the code but I need to better understand what I should be asking for vs what is already supported. |
I went ahead and created the dbt-core issue and linked it to this one |
There are places in dbt-databricks that explicitly enumerate supported materializations that we need to remove. |
Describe the bug
I would like to try using the materialization type of
clone
so that I can have a model that "publishes" tested data runs downstream from the actual model being tested. The clone should have the same table name as the upstream model but should be in a different database schema.This materialization type is not documented and I can't figure out how to get it to work for my use case.
Code for the
clone
materialization: https://github.com/databricks/dbt-databricks/blob/main/dbt/include/databricks/macros/materializations/clone.sqlSteps To Reproduce
clone
materialization typeExpected behavior
Screenshots and log output
n/a
System information
The output of
dbt --version
:The operating system you're using:
The output of
python --version
:Additional context
The text was updated successfully, but these errors were encountered: