tableau / connector-plugin-sdk

SDK for Developing Tableau Connector Plugins
https://tableau.github.io/connector-plugin-sdk/
MIT License
105 stars 107 forks source link

custom probe query after enabling CAP_FORCE_CONNECTION_VERIFICATION #1207

Closed xsgao-github closed 7 months ago

xsgao-github commented 7 months ago

About You: Name: Song Gao Company: Starburst Data

Your question: We are using the Trino JDBC driver and enabled CAP_FORCE_CONNECTION_VERIFICATION in our connector per this doc:

CAP_FORCE_CONNECTION_VERIFICATION Set to ‘yes’ to verify connection status during initial connection by running a probe query. Available in Tableau 2022.2 and newer.

Now I see Tableau always sends a query select version() during connection.

My questions are:

  1. Where is this probe query defined?
  2. Can I customize this query or even add a function to validate the returned resultset of the probe query?
rosswbrown commented 7 months ago

The current design of CAP_FORCE_CONNECTION_VERIFICATION does not check the result of the probe query beyond that it does not fail. The probe query should always SELECT 1 for a connector built from the SDK. The probe query is also used to test lifetime and disconnect scenarios as well.

What is your desired use case with a potential customization?

xsgao-github commented 7 months ago

My bad. The probe query is SELECT 1.

I would like to add some validation on Tableau connector. For example, if the server does not meet the minimum version of server requirement, error it out.

rosswbrown commented 7 months ago

Ok, that makes sense. Please open an issue about your desire to enforce the minimum server version as a part of defining a connector. Anything like this would be decoupled from CAP_FORCE_CONNECTION_VERIFICATION.

I'll make sure it gets tagged as a potential enhancement. Thanks.

xsgao-github commented 7 months ago

Feature request here https://github.com/tableau/connector-plugin-sdk/issues/1210