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

Prune path before using a CTA #58

Closed
nicor88 opened this issue Nov 24, 2022 · 3 comments
Closed

Prune path before using a CTA #58

nicor88 opened this issue Nov 24, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@nicor88
Copy link
Member

nicor88 commented Nov 24, 2022

What

to avoid: HIVE_PATH_ALREADY_EXISTS, ensure that the path is pruned. Check implementation here, in our case we can build something similar.

Iceberg table should avoid to use that, as the table drop take care of pruning the location.

@nicor88 nicor88 added bug Something isn't working relevant labels Nov 25, 2022
@nicor88 nicor88 closed this as completed Dec 21, 2022
@nicor88
Copy link
Member Author

nicor88 commented Dec 22, 2022

@antruo this fix should also cover tmp tables right??

[0m15:55:16    HIVE_PATH_ALREADY_EXISTS: Target directory for table 'default.parquet_example_3__dbt_tmp' already exists: s3://silver-datalake-dev-xxxxx-eu-central-1/parquet_example_3__dbt_tmp. You may need to manually clean the data at location 's3://athena-query-results-dev-xxxxxx-eu-central-1/dbt/tables/2c1d4480-15a0-4b80-bdf4-ba43c0c028af' before retrying. Athena will not delete data in your account.
[0m15:55:16 HIVE_PATH_ALREADY_EXISTS: Target directory for table 'default.parquet_example_3__dbt_tmp' already exists: s3://silver-datalake-dev-901621332207-eu-central-1/parquet_example_3__dbt_tmp. You may need to manually clean the data at location 's3://athena-query-results-dev-xxxxxxx-eu-central-1/dbt/tables/2c1d4480-15a0-4b80-bdf4-ba43c0c028af' before retrying. Athena will not delete data in your account.

I got this with 1.3.3 version,

@antruo
Copy link

antruo commented Dec 22, 2022

Yes! I guess you are referring to the temp tables that are being created when running an incremental model? That one just uses the create_table_as() macro, which runs the prune_s3_table_location() prior to the CTA statement.

@andrewcstewart
Copy link

Are there other known causes for the HIVE_PATH_ALREADY_EXISTS that the path pruning isn't addressing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants