-
Notifications
You must be signed in to change notification settings - Fork 107
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
No schemas showing for JDBC connection #1252
Comments
Internal tracking ID: 16646216 |
A couple of quick things to check: The relevant JDBC metadata queries are listed here: https://tableau.github.io/connector-plugin-sdk/docs/metadata-enumeration#jdbc-metadata-enumeration Full list of all capabilities is here: https://tableau.github.io/connector-plugin-sdk/docs/capabilities. Given the errors in the log, you may want to double check the CAP_SELECT_INTO capability should be set to yes for you. More documentation on setting capabilities: https://tableau.github.io/connector-plugin-sdk/docs/design#set-connector-capabilities If you're still running into issues, we'll take a look, but this looks like a specific issue with connecting to your data source that we don't have insight into. |
Those are our temp table probe queries. We use temp tables for optimizations, but they usually aren't required except in some very large queries. It's probably a red herring (definitely not the first time). |
Tableau needs to understand if your database should list catalogs (databases) or schemas only. You have specified dbname in the URL. In cases like that it's common (but not always) that you would disable catalog queries and only list schemas. That's probably what you need to do. |
Thank you for your quick response! I set the following customizations based on the linked documentation: <customizations>
<customization name="CAP_SELECT_INTO" value="yes"/>
<customization name="CAP_JDBC_SUPPRESS_EMPTY_CATALOG_NAME" value="yes"/>
<customization name="CAP_JDBC_METADATA_SUPPRESS_PREPARED_QUERY" value="yes"/>
<customization name="CAP_JDBC_METADATA_USE_RESULTSET_FOR_TABLE " value="yes"/>
<customization name="CAP_JDBC_METADATA_READ_FOREIGNKEYS" value="no"/>
<customization name="CAP_JDBC_METADATA_READ_PRIMARYKEYS" value="no"/>
<customization name="CAP_JDBC_METADATA_GET_INDEX_INFO" value="no"/>
</customizations> But I'm still getting the following errors:
Again, thank you for all your help! |
Just a quick update, I entered a simple SELECT column FROM schema."table_name" and saw this in the logs: {00000000-0000-0000-0000-000000000000}. Running query
SELECT column FROM schema."table_name"
2024-09-04 05:39:44.938 -0700 (,,,,1,32) grpc-default-executor-3 : INFO com.tableau.connect.grpc.GrpcProtocolService - End local request 32 /runQuery.
2024-09-04 05:39:47.412 -0700 (,,,,1,32) pool-3-thread-2 : INFO com.tableausoftware.jdbc.FetchSizeHelpers - Setting max result buffer size to 322122547 bytes, 30% of the max heap size.
2024-09-04 05:39:47.412 -0700 (,,,,1,32) pool-3-thread-2 : INFO com.tableausoftware.jdbc.FetchSizeHelpers - Setting adaptive fetch size to 2000.
2024-09-04 05:39:47.412 -0700 (,,,,1,32) pool-3-thread-2 : INFO com.tableausoftware.data.ProtobufJDBCResultSet - BindingInfo{columnName='column', columnTypeName='VARCHAR', columnLabel='column', columnType=12, precision=10, scale=0, columnDisplaySize=10, protobufType=STRING, nullable=nullable}
2024-09-04 05:39:47.456 -0700 (,,,,1,32) pool-3-thread-2 : INFO com.tableau.connect.service.QueryTask - Query task for protocol 1 completed. So Tableau seems to be able to read the view fine. But right after this initial SQL, it runs the |
I added the following flags to the <customization name="CAP_JDBC_SUPPRESS_ENUMERATE_DATABASES" value="yes"/>
<customization name="CAP_JDBC_SUPPRESS_ENUMERATE_SCHEMAS" value="yes"/> and now I don't see the |
My apologies for the spamming but I'm currently running a trial version of Tableau while I'm getting a more permanent license. Should that have an impact? |
Hi Chris, This is an example of the connection-metadata.xml file
You may want to play with the enabling |
I got it to work! I had to play around with the
<connection-customization class="db2_jdbc_cloud" enabled="true" version="10.0">
<vendor name="vendor"/>
<driver name="driver"/>
<customizations>
<customization name="CAP_SELECT_INTO" value="no"/>
<customization name="CAP_JDBC_SUPPRESS_EMPTY_CATALOG_NAME" value="yes"/>
<customization name="CAP_JDBC_METADATA_SUPPRESS_PREPARED_QUERY" value="yes"/>
<customization name="CAP_JDBC_METADATA_USE_RESULTSET_FOR_TABLE " value="no"/>
<customization name="CAP_JDBC_METADATA_READ_FOREIGNKEYS" value="no"/>
<customization name="CAP_JDBC_METADATA_READ_PRIMARYKEYS" value="no"/>
<customization name="CAP_JDBC_METADATA_GET_INDEX_INFO" value="no"/>
</customizations>
</connection-customization>
<connection-metadata>
<database enabled='false' />
<schema enabled='true' />
<table enabled='false' />
</connection-metadata> Thank you for all your help! |
One thing to note is that we followed this example <database enabled='true'>
<field />
</database> But if we set the |
About You:
Name: Chris A
Company:
Your question:
We took the example JDBC connector and modified it to add new fields to the input form. We are trying to connect to IBM Watson Query via JDBC using the following connection string:
This string works without issues in DBeaver and we can see schemas and views. However, in Tableau, we don't see any schemas at all.
If we leave the default values in the
customization
section of themanifest.xml
(shown here):If we set all the items in the
customization
section tono
, we don't get the syntax exception but only see this:Do you have any advice on what seems to be going wrong here? We know the connection works when connecting from other tools but it doesn't work from Tableau. Any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: