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

external_location ignored when table_type='hive' #539

Open
TassOlympus opened this issue Dec 13, 2023 · 5 comments
Open

external_location ignored when table_type='hive' #539

TassOlympus opened this issue Dec 13, 2023 · 5 comments

Comments

@TassOlympus
Copy link

TassOlympus commented Dec 13, 2023

Using the latest version 1.7.0 with a model that has a hive table type used to allow the specification and enforcement of the external_location configuration within the models, it appears it is now being ignored in the latest version when new hive tables are created

@nicor88
Copy link
Contributor

nicor88 commented Dec 14, 2023

@TassOlympus do you use a workgroup with enforced "configurations"? If that's the case external_location is fully ignored.
Also there was to change on how external_location is used in 1.7.0.

@TassOlympus
Copy link
Author

@nicor88 there is a location specified in the work group being used but specifying "external_location" works for iceberg tables regardless of the workgroup location, it's just hive tables where it is ignored. I would imagine that should a location be specified at the model level that it would override the workgroup location? Is there a reason why it is different across table types?

@nicor88
Copy link
Contributor

nicor88 commented Dec 14, 2023

Iceberg table are managed tables, therefore the workgroup location is not used.
Hive tables at the contrary are not managed table, therefore what happen is that your "workgroup" enforced location is used by default.
You have 2 options:

  • disable workgroup config enforcement in your workgroup setting
  • if you cannot follow the first option, consider to create a new workgroup (without location set) only for dbt - I like this approach more, as you can control as well how much cost running queries by dbt.

@TassOlympus
Copy link
Author

Thanks @nicor88, this is useful and helped resolve our issue (we went for the separate work group approach), could documentation perhaps be updated to articulate this information under https://github.com/dbt-athena/dbt-athena#table-location? The note was misleading since it did not apply to iceberg tables and seems to speak directly to "s3_data_naming" alone

@nicor88
Copy link
Contributor

nicor88 commented Dec 19, 2023

@TassOlympus good catch, docs must be updated indeed. Feel free to submit a PR to address this.

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

No branches or pull requests

2 participants