tableau / server-client-python

A Python library for the Tableau Server REST API
https://tableau.github.io/server-client-python/
MIT License
662 stars 421 forks source link

Databricks Workbook Table Name Length Limit #1189

Open williamdphillips opened 1 year ago

williamdphillips commented 1 year ago

Describe the bug When using TSC and attempting to publish a Tableau Workbook created with Tableau Desktop 2022.1.10, there seems to be a table name char limit that Tableau is using internally for the references. When a table name (note that connection names in a workbook's xml) exceeds 63 chars, the name of the connection is cutoff, making it possibly different from the actual table name. This seems like it would not be a problem if, when publishing, the actual table name was being referenced. However, when attempting to publish such a workbook with TSC, the connection to the datasource fails. It seems like this is because it is attempting to connect using the name of the connection rather than the table defined within the connection. If the connection name is within the 63 char limit, this issue doesn't exist.

Example of a connection defined within the xml of a workbook using Databricks SQL connection source: <relation connection='databricks.0e0f5f608zo1r61aqy9xh11sjmxu' name='drew_databricks_notebook_workpaper_v1_output_aging_category_rat' table='[my_database].[drew_databricks_notebook_workpaper_v1_output_aging_category_ratio_output]' type='table' />

Versions Details of your environment, including:

To Reproduce

  1. Create a Tableau Workbook using Tableau Desktop with Databricks SQL as the source
  2. Using PAT authentication, connect to a SQL Warehouse and ensure you are using a long table name >63 chars
  3. Save the workbook with the connections as well as some visualizations for testing
  4. Check out the XML and note the connection name is cutoff
  5. Attempt to publish the workbook to Tableau Server with TSC
  6. The error will mention that you are unable to establish a connection to the datasource, even though you just did with Tableau Desktop

Error { "error": "Tableau_TradeAR_Notebook_2 failed to establish a connection to your datasource." }

williamdphillips commented 1 year ago

Just an update on this. We again ran into a similar issue when upgrading to 2022.1.11. When attempting to publish a workbook to Tableau Server (via TSC or UI) that was created from Tableau Desktop, if that workbook has a connection (Databricks SQL) that is long, Tableau Server throws a 500 internal server error.

I'm not sure if this is because of the table name length itself or because of the catalog.schema.table_name total length. We tried reducing the table name for one workbook to test, and it resolved the issue. However, in order to fully resolve it was are opening a support ticket with Tableau to find out why the error is being thrown.

williamdphillips commented 1 year ago

Due to not getting this resolved with Tableau Support, our team was forced to ensure the three level namespace for our schema+tables did not exceed 124 chars.