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

How to avoid the check for default database? #67

Open
mostrovoi opened this issue May 17, 2023 · 1 comment
Open

How to avoid the check for default database? #67

mostrovoi opened this issue May 17, 2023 · 1 comment

Comments

@mostrovoi
Copy link

mostrovoi commented May 17, 2023

We are using this library and we are facing the issue that it tries to access the default database (hardcoded as "default"). Checks for its existence and if does not exist then tries to create it

The problem is that our SRE team does not allow us to access the default database so we dont have the permission glue:GetDatabase on default and this causes the application to fail.

We have configured a different database as default and we were wondering if there is a way to configure the library to avoid the check for default database. There seems a boolean in the builder (createDefaults) that if set would avoid the check for default database altogether, see :

https://github.com/awslabs/aws-glue-data-catalog-client-for-apache-hive-metastore/blob/branch-3.4.0/aws-glue-datacatalog-hive3-client/src/main/java/com/amazonaws/glue/catalog/metastore/AWSCatalogMetastoreClient.java#L274

The problem is that we dont know how to instantiate this library with the boolean in order to avoid the check for default database.

Thanks for the help!
Oscar

@MasterDDT
Copy link

I forked the lib and added a config to remove the check, it also is a perf hit if you are continually checking every time for the default db (even if it exists). In our use case, we always have a specific db+table pair, we never touch default.

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