Get Datasource Metadata
Fetches datasource metadata for the specified datasource, including:
- datasource description
- datasource model relationships (when available)
- fields grouped by
logicalTableId - Tableau parameters
APIs called
- Request data source metadata
- Request data source model
- Metadata API
- Query Data Source (if applicable tool scoping is enabled)
- Query Workbook Connections
and
Get Workbook
(if
workbookLuidis provided and tool scoping is enabled)
Environment variables
Required arguments
datasourceLuid
The LUID of the data source, potentially retrieved by the List Data Sources tool.
Example: 2d935df8-fe7e-4fd8-bb14-35eb4ba31d45
Optional arguments
workbookLuid
The LUID of the workbook an embedded (workbook) data source belongs to, potentially retrieved by the Get Workbook tool. Required to access an embedded data source when tool scoping is enabled. Ignored for published data sources.
Example: 222ea993-9391-4910-a167-56b3d19b4e3b
Response shape
Top-level keys are returned in this order:
datasourceDescriptiondatasourceModel(optional)fieldGroupsparameters
datasourceModel is available on Tableau versions that support the VDS get-datasource-model
endpoint (2025.3+). On older versions, it is omitted.
Example result
{
"datasourceDescription": "Datasource metadata and usage notes...",
"datasourceModel": {
"logicalTables": [
{
"logicalTableId": "Orders_...",
"caption": "Orders"
},
{
"logicalTableId": "Returns_...",
"caption": "Returns"
}
],
"logicalTableRelationships": [
{
"fromLogicalTable": { "logicalTableId": "Orders_..." },
"toLogicalTable": { "logicalTableId": "Returns_..." },
"expression": {
"relationships": [
{
"operator": "=",
"fromField": "[Order ID]",
"toField": "[Order ID (Returns)]"
}
]
}
}
]
},
"fieldGroups": [
{
"logicalTableId": "Orders_...",
"fields": [
{
"name": "Order ID",
"dataType": "STRING",
"columnClass": "COLUMN",
"logicalTableId": "Orders_...",
"defaultAggregation": "COUNT",
"dataCategory": "NOMINAL",
"role": "DIMENSION"
},
{
"name": "Sales",
"dataType": "REAL",
"columnClass": "COLUMN",
"logicalTableId": "Orders_...",
"defaultAggregation": "SUM",
"dataCategory": "QUANTITATIVE",
"role": "MEASURE"
}
]
},
{
"logicalTableId": null,
"fields": [
{
"name": "CrossTable Calc",
"dataType": "REAL",
"columnClass": "CALCULATION",
"logicalTableId": null,
"defaultAggregation": "SUM",
"formula": "[Sales] / NULLIF([Quantity], 0)"
}
]
}
],
"parameters": [
{
"name": "Top Customers",
"parameterType": "QUANTITATIVE_RANGE",
"dataType": "INTEGER",
"value": 5,
"min": 5,
"max": 20,
"step": 5
},
{
"name": "Profit Bin Size",
"parameterType": "QUANTITATIVE_RANGE",
"dataType": "INTEGER",
"value": 200,
"min": 50,
"max": 200,
"step": 50
}
]
}