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

feat: add detailed_table_type property to list_relations_without_caching function #513

Conversation

sanromeo
Copy link
Contributor

@sanromeo sanromeo commented Nov 17, 2023

Description

In dbt/adapters/athena/impl.py, I've added new parameter to additionally handle the table_type attribute for Iceberg tables. The update add new optional parameter detailed_table_type which gets from Table["Parameters"]["table_type"] dictionary if it not exists - set detailed_table_type to None.

I've extended the AthenaRelation class in dbt/adapters/athena/relation.py to include a new optional attribute detailed_table_type. This attribute holds the specific type of table as described in the table's parameters in the Glue Catalog, providing more detailed context about the Athena relation.

Resolves: #511

Checklist

  • You followed contributing section
  • You kept your Pull Request small and focused on a single feature or bug fix.
  • You added unit testing when necessary
  • You added functional testing when necessary

@sanromeo sanromeo marked this pull request as ready for review November 17, 2023 16:02
@sanromeo sanromeo changed the title feat: add iceberg table property to list relations without caching function feat: add detailed_table_type property to list_relations_without_caching function Nov 17, 2023
@nicor88
Copy link
Contributor

nicor88 commented Nov 17, 2023

@sanromeo nice, could you add some unit tests and functional tests if possible? For the functional tests you can add 2 models, one that is iceberg, there other calls the macro and return the detailed table type

@sanromeo
Copy link
Contributor Author

@sanromeo nice, could you add some unit tests and functional tests if possible? For the functional tests you can add 2 models, one that is iceberg, there other calls the macro and return the detailed table type

@nicor88 no problem 😉 I will add tests

@nicor88
Copy link
Contributor

nicor88 commented Nov 18, 2023

@sanromeo thanks, also have a look at the ci failures, seems that unit tests are broken

…ithout_caching, add assertions for detailed_table_type parameter
@sanromeo
Copy link
Contributor Author

@nicor88 I've added functional test for detailed_table_type parameter.
Could you review PR again?

@sanromeo sanromeo requested a review from nicor88 November 19, 2023 15:26
Copy link
Contributor

@nicor88 nicor88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sanromeo thanks for your contribution, looks good to me.

@nicor88 nicor88 merged commit d4fa279 into dbt-labs:main Nov 20, 2023
9 checks passed
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

Successfully merging this pull request may close these issues.

Add parameter detailed_table_type for list_relations_without_caching function
2 participants