You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2021/10/04 08:00:02 UTC

[GitHub] [drill] jaceksan opened a new issue #2324: Snowflake - adopt JDBC parameter CLIENT_METADATA_REQUEST_USE_CONNECTION_CTX

jaceksan opened a new issue #2324:
URL: https://github.com/apache/drill/issues/2324


   **Is your feature request related to a problem? Please describe.**
   I specify JDBC URL like this:
   `jdbc:snowflake://<account>.snowflakecomputing.com:443?warehouse=<warehouse>&db=<db>&CLIENT_METADATA_REQUEST_USE_CONNECTION_CTX=true`
   
   Despite I use CLIENT_METADATA_REQUEST_USE_CONNECTION_CTX=true , INFORMATION_SCHEMA.SCHEMATA contains schemata from all warehouses and databases (the user has access to everywhere).
   
   In our platform, when I use this parameter and I call e.g. dbMetadata.getTables() , it collects only tables from corresponding warehouse and database.
   
   Querying all warehouses can be very expensive causing SELECT from Drill INFORMATION_SCHEMA takes ages.
   
   **Describe the solution you'd like**
   Parameter CLIENT_METADATA_REQUEST_USE_CONNECTION_CTX is properly propagated to the connection from Drill to Snowflake, only objects from warehouse/database specified in the JDBC URL are populated into Drill INFORMATION_SCHEMA.
   
   **Describe alternatives you've considered**
   The only workaround solution is to limit privileges of DB user (what warehouses/databases he can see). This is not a valid workaround in our case (testing user has read access to huge number of testing warehouses/databases).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] jnturton commented on issue #2324: Snowflake - adopt JDBC parameter CLIENT_METADATA_REQUEST_USE_CONNECTION_CTX

Posted by GitBox <gi...@apache.org>.
jnturton commented on issue #2324:
URL: https://github.com/apache/drill/issues/2324#issuecomment-1072408156


   Hi, I do believe that any JDBC URL parameters that you put in a storage config will be passed through to the JDBC driver unmodified by Drill.  Are you able to run the following test for us?  It could be that the way that Drill collects metadata is not governed by `CLIENT_METADATA_REQUEST_USE_CONNECTION_CTX`...
   
   ```
   Connection con = // obtain a connection using desired URL params
   ResultSet rs = con.getMetaData().getCatalogs();
   // are all catalogs returned in rs?
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] jnturton commented on issue #2324: Snowflake - adopt JDBC parameter CLIENT_METADATA_REQUEST_USE_CONNECTION_CTX

Posted by GitBox <gi...@apache.org>.
jnturton commented on issue #2324:
URL: https://github.com/apache/drill/issues/2324#issuecomment-1072408156


   Hi, I do believe that any JDBC URL parameters that you put in a storage config will be passed through to the JDBC driver unmodified by Drill.  Are you able to run the following test for us?  It could be that the way that Drill collects metadata is not governed by `CLIENT_METADATA_REQUEST_USE_CONNECTION_CTX`...
   
   ```
   Connection con = // obtain a connection using desired URL params
   ResultSet rs = con.getMetaData().getCatalogs();
   // are all catalogs returned in rs?
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org