Area: Ingestion Issues
Sub-Area: Tableau Connector Configuration & Performance
Applies to: OSS + Cloud
Issue
Tableau ingestion that used to finish now has one or more of these problems:
- It runs for hours.
- It fails after repeated 30 second timeouts on
databaseTablesConnection. - It fails mid-run with 401 Unauthorized, even though the Personal Access Token (PAT) is valid.
- It reports "Tableau Data Exceed Predefined Limit" and some workbooks or data sources are missing.
- It finishes but ingests nothing from the projects you expected.
Each of these has a different cause. Work through the sections below that match your logs.
Error Messages
Query databaseTablesConnection received a retryable error with 3 retries remaining, will retry in 1 seconds: [{'message': 'Execution canceled because timeout of 30000 millis was reached', ...}]Query databaseTablesConnection error after exhausting retries: ...<class 'tableauserverclient.server.endpoint.exceptions.NonXMLResponseError'>: b'{"timestamp":"...","status":401,"error":"Unauthorized","path":"/relationship-service-war/graphql"}'Retrying query due to NonXMLResponseError with 3 retries remaining, will retry in 1 secondsTableau Data Exceed Predefined LimitProject (<name>) is not allowed as per project_pattern or project_path_pattern
You Might Be Asking
- Why does Tableau ingestion time out on
databaseTablesConnection? - Do I need virtual connection ingestion, and how do I turn it off?
- Why does ingestion fail with 401 Unauthorized when the PAT has not expired?
- What does "Tableau Data Exceed Predefined Limit" mean and how do I fix it?
- Why does my project filter match nothing even though it looks right?
Solution
1. Turn off virtual connection ingestion if you don't need it
Current DataHub CLI releases ingest Tableau virtual connections by default (ingest_virtual_connections: true).
During the run, the connector collects references from your data sources to tables that belong to virtual connections. If it finds any, it reads every database table on the site through databaseTablesConnection, with no filter, to match them. On a large site this one scan adds many paginated queries and can hit Tableau's 30 second timeout. If it finds no references, it skips this step.
Check the run log for this line:
Virtual connections: N table references found, M VCs to process
If N is greater than 0 and you don't need virtual connections or their lineage in DataHub, turn the feature off:
source:
type: tableau
config:
ingest_virtual_connections: false
See Virtual Connections in the Tableau source docs.
2. Lower the page size for the query that times out
The connector retries a query that returns "Execution canceled because timeout of 30000 millis was reached". The number of retries is max_retries (default 3), with a wait of 1, 4, then 9 seconds. After the last retry the run fails with Query <connection> error after exhausting retries.
Smaller pages make each query lighter. The connector also reads database tables with databaseTablesConnection when it emits upstream tables, and database_table_page_size controls both that query and the virtual connection scan. It falls back to page_size, which defaults to 10:
source:
type: tableau
config:
database_table_page_size: 5
Smaller pages mean more requests, so total run time can go up. Lower the value only as far as you need to stop the timeouts.
3. Fix "Tableau Data Exceed Predefined Limit"
This warning means Tableau's Metadata API returned NODE_LIMIT_EXCEEDED. Tableau sends back partial results, so some metadata in that page is missing from DataHub. The warning's context shows the connection_type of the query that hit the limit. Lower the page size for that query:
-
workbooksConnection:workbook_page_size(default 1) -
embeddedDatasourcesConnection:embedded_datasource_page_size -
publishedDatasourcesConnection:published_datasource_page_size -
sheetsConnection:sheet_page_size -
dashboardsConnection:dashboard_page_size -
customSQLTablesConnection:custom_sql_table_page_size -
databaseTablesConnection:database_table_page_size -
fieldsConnection:embedded_datasource_field_upstream_page_sizeorpublished_datasource_field_upstream_page_size(these fall back topage_size× 10)
Settings with no default listed fall back to page_size (default 10). For example:
source:
type: tableau
config:
embedded_datasource_page_size: 5
Changing the page size for a different query does not clear this warning. Your Tableau Server administrator can also raise the Metadata API node limit with TSM. The warning text links to the Tableau page for that setting. See Why are only some workbooks/custom SQLs/published datasources ingested from the specified project?.
workbook_page_size defaults to 1 because workbook queries often hit the node limit. Raising it cuts the number of workbook requests but makes the warning more likely. If you raise it, watch for the warning on workbooksConnection.
4. Fix 401 errors mid-run
When a query returns a 401 (NonXMLResponseError), the connector does this:
- If more than 10 minutes have passed since it last signed in, it signs in again and retries. Long runs that outlive Tableau's session are handled this way.
- If less than 10 minutes have passed, it retries on the same session without signing in again, up to
max_retriestimes, and then fails.
So a 401 that ends the run early points to the session being ended from outside the run. Tableau ends a PAT's existing session when the same PAT signs in again. If two recipes (for example DEV and PRD) or two overlapping runs use one PAT, one run's sign-in ends the other run's session. Tableau documents this limit on Personal Access Tokens.
A shared or overlapping PAT often looks like this: sign-in succeeds, then later API calls fail with 401002: Unauthorized Access. The two runs often start seconds apart.
Give each recipe its own PAT, and don't start a run while another run with the same PAT is still going:
# DEV recipe
source:
type: tableau
config:
token_name: datahub-dev-token
token_value: "${TABLEAU_DEV_TOKEN}"
# PRD recipe
source:
type: tableau
config:
token_name: datahub-prd-token
token_value: "${TABLEAU_PRD_TOKEN}"
5. Escape special characters in project filters
Project filters are Python regular expressions. Matching starts at the beginning of the string and ignores case by default. Parentheses form a group, so .*(Dev)$ does not match a project named Sales (Dev). Escape them to match literal parentheses.
project_pattern is deprecated. Use project_path_pattern, which matches the project's full path (for example Parent/Child):
source:
type: tableau
config:
project_path_pattern:
allow:
- '.*\(Dev\)$'
Keep the pattern in single quotes so YAML keeps the backslashes. When no project matches, the run finishes without ingesting workbooks from those projects. The log shows Project (<name>) is not allowed as per project_pattern or project_path_pattern for each skipped project. If you set both project_pattern and project_path_pattern, a project must pass both.
6. Use the right Tableau site role
The user or PAT owner needs at least the Site Administrator Explorer site role. With a lower role, the Tableau Metadata API returns partial metadata, which affects data source fields and column-level lineage. See the Tableau source prerequisites.
Example recipe with these settings
source:
type: tableau
config:
connect_uri: "https://<your-tableau-server>"
site: "<your-site-name>"
token_name: "<recipe-specific-token-name>"
token_value: "${TABLEAU_TOKEN}"
project_path_pattern:
allow:
- '.*\(Dev\)$'
ingest_virtual_connections: false
database_table_page_size: 5
embedded_datasource_page_size: 5
Only add the settings that match a problem you see in your logs.
Additional Notes
- The ingestion report counts queries per connection type (
num_queries_by_connection_type,num_filter_queries_by_connection_type,num_paginated_queries_by_connection_type). Use these to see which query a page size change affected. - When you test page size changes, run one recipe at a time so a shared token can't cause 401s that look like a page size problem.