🕐 2 min read
The Request data source model method provides you with the logical table and relationship metadata in a published data source. This method requires that you pass in the data source object, which is the datasourceLuid for a published data source. To find the datasourceLuid, see Find the data source LUID.
{
"datasource": {
"datasourceLuid": "1a2a3b4b-5c6c-7d8d-9e0e-1f2f3a4a5b6b",
}
}
workbookDatasourceId is a valid datasource for the get-datasource-model method, it is not supported.
The request has the following options:
bypassMetadataCache: Set to true if either the published data source or the underlying database has changed within your current session. When set to true, VizQL Data Service (VDS) refreshes the metadata. Note that VDS automatically invalidates the cache when the data source is republished. Use this option if your underlying database has changed.
withNewSession: Set to true to request a new session. Clears the cached session for the user before a new session is created.
interpretFieldCaptionsAsFieldNames: When set to true, the response returns the fieldName value everywhere the fieldCaption is used. This is also true for parameters. For example, if you set this field to true, the response returns, for example, Parameter 2 instead of Profit Bin Size.
includeHiddenFields: When set to true, the response shows hidden fields.
includeGroupFormulas: When set to true, the response shows the group information for fields that are categorical bins.
This API method returns two objects: logicalTables and logicalTableRelationships. The logicalTables object returns these fields:
logicalTableId: The logical table LUID.caption: The user-defined logical table display name.The logicalTableRelationships object returns these fields:
fromLogicalTable: Contains the key:value pair for LUID of the table on the left.toLogicalTable: Contains the key:value pair for LUID of the table on the right.For this example, let’s use a data source with the following model in the Tableau user interface:

A request to this data source returns the following response:
{
"logicalTables": [
{
"logicalTableId": "Orders_ECFCA1FB690A41FE803BC071773BA862",
"caption": "Orders"
},
{
"logicalTableId": "People_D73023733B004CC1B3CB1ACF62F4A965",
"caption": "People"
},
{
"logicalTableId": "Returns_2AA0FE4D737A4F63970131D0E7480A03",
"caption": "Returns"
}
],
"logicalTableRelationships": [
{
"fromLogicalTable": {
"logicalTableId": "Orders_ECFCA1FB690A41FE803BC071773BA862"
},
"toLogicalTable": {
"logicalTableId": "People_D73023733B004CC1B3CB1ACF62F4A965"
}
},
{
"fromLogicalTable": {
"logicalTableId": "Orders_ECFCA1FB690A41FE803BC071773BA862"
},
"toLogicalTable": {
"logicalTableId": "Returns_2AA0FE4D737A4F63970131D0E7480A03"
}
}
]
}
For more information, see The Tableau Data Model.