-
Notifications
You must be signed in to change notification settings - Fork 95
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
fix: implement native_iceberg_drop #292
Conversation
@brabster shall we call this |
@nicor88 |
🤔 when I committed the restrictive role contained in the CloudFormation template for convenience) my thinking was to document a specific set of permissions in a role that can be used by anyone (or automation) for testing that the base functionality works without direct access to restricted APIs - obvs. could loosen the restrictions eg. to allow direct access to certain Glue APis. Maybe it's a separate thread/issue, but having a way to explicitly test that basic dbt functionality works under a more restrictive set of permissions than the one currently used seems like the only way to really say that dbt-athena can be used under those permissions? Otherwise at this point I'm the only one who can really say that a fix works and what the permissions I'm using are |
What do we need to achieve this in a more scalable way:
IMHO, in this specific case you are not really blocked, as you can prepare the feature without all the testing setup - to see if it works we can check if drops query hits athena, and you can turn debug mode on to see if the s3 cleanup path is called. |
It might make sense to combine this and the native seed thing - they are a bit coupled together which makes me a bit unsure whether it's good as a whole. Added logging to make behaviour clear. I'll move the role definition before finalising Evidence
|
Test run output, unit_tests all passing too. The native iceberg drop test is skipped as we hit DDL timeout, see issue #312
|
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.
Please see my comment.
Not sure how to close off the 2x requested changes - they have been implemented |
I've been trying out these changes in my real project and looking at the logs I've got a suspicion that native_drop might be taking effect when it shouldn't... super difficult to be confident without tests and it's unclear how to write/augment tests that ensure the correct behaviour in on/off cases. I did wonder about asserting the logs do or do not contain specific text (this is how I'm checking by hand) but I'm not sure how to assert against the caplog for the existing test cases that are extending dbt base tests, any ideas? |
There was a bug, the way I was trying to get the value of 'native_drop' as a boolean was always true and that meant that any iceberg table would get the native drop behaviour regardless of the flag.
Swapped to
Based on similar bool config option in sqlserver adapter and seems to work correctly based on log inspection. Also removed a few messy log messages that I'd left in there. Gotta love booleans in text-based config 🙄 |
I would prefer to have all such configs in format
just try to run the following code in python console:
|
@svdimchenko thanks for the review - my adjustments are based on several trials of different ways of expressing a boolean such that it worked in the iceberg test cases and in my actual model dbt config. I was really struggling to work out what the heck type was actually coming out in the Jinja template until I found that sqlserver example and this SO post which refers to Jinja docs and suggests that the bool types are lowercased in Jinja:
So i'm confused now - bool casing should be lower, and |
… dev and testing
Description
Remove need for direct access to S3 & Glue to drop an Iceberg table. I figured that there needs to be a way for me and others to test the solution works with the restricted permissions so I have the start of that here.
Models used to test - Optional
Checklist