-
Notifications
You must be signed in to change notification settings - Fork 180
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
Feature: Custom Iceberg base_location
#1289
base: main
Are you sure you want to change the base?
Conversation
Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA. In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR. CLA has not been signed by users: @LProcopi15 |
Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the dbt-snowflake contributing guide. |
base_location
tests/functional/iceberg/models.py
Outdated
cluster_by=['id'], | ||
table_format="iceberg", | ||
external_volume="s3_iceberg_snow", | ||
base_location="base_path", |
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.
for this test, do we not need an actual base_path? (I honestly have no idea but wanted to ask)
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.
If the path doesn't already exist, it is created by Snowflake when you run create or replace iceberg table
, so for our test we don't need to use an existing path
resolves #1284
Related docs
Problem
Currently, we only allow users to append a
base_location_subpath
to abase_location
when creating a Snowflake Iceberg table. We've hard coded in thebase_location
root to be_dbt/<schema-name>/<table-name>
.Some customers have requested we allow overrides of the top-level
_dbt/
directory. After discussing with product (@amychen1776), we've decided to add support for this.Solution
Add a new optional config for Snowflake called
base_location_root
. If this is provided, it will override the default dbtbase_location
value (_dbt/<schema_name>/<table_name>/
) tobase_location_root/<schema_name>/<table_name>/
)Examples from test runs:
Configs for
_MODEL_BASIC_ICEBERG_MODEL
:base_location_subpath="subpath",
(nobase_location_root
). Snowflake ddl generated:Configs for
_MODEL_BASIC_ICEBERG_MODEL_WITH_PATH
:base_location_root="root_path",
(nobase_location_subpath
). Snowflake ddl generated:Configs for
_MODEL_BASIC_ICEBERG_MODEL_WITH_PATH_SUBPATH
:base_location_root="root_path", base_location_subpath="subpath",
. Snowflake ddl generated:Validation of Unit Tests
Checklist
@amychen1776 and I have discussed and aligned on these changes.