đ 3 min read
To run a query, you must know the locally unique identifier (LUID) of the data source youâre requesting information about. There are two options for finding the data source name.
Select the Edit Data Source button. A new tab displays showing the data source name in the URL. For example:
https://10ax.online.tableau.com/t/<site_name>/editDatasource/<luid>/<DATASOURCE_NAME>#1
Use the Query Data Sources method to return a list of data sources on your site. This method returns the official data source name in the contentURL
attribute.
The Request data source metadata method provides you with additional information about the queryable fields in a data source. This method requires that you pass in the data source object, as shown in the following example.
{
"datasource": {
"datasourceLuid": "",
}
}
This API endpoint returns a list of fields with:
fieldName
: The underlying field name on the data source.fieldCaption
: This is what you need to pass into a query. This is often the same as fieldName
.dataType
: Either INTEGER
, REAL
, STRING
, DATETIME
, BOOLEAN
, DATE
, SPATIAL
, or UNKNOWN
.logicalTableId
: If you have a data model with more than one logical table, this will tell you which table the field originated from.{
"data": [
{
"fieldName": "Calculation_1368249927221915648",
"fieldCaption": "Profit Ratio",
"dataType": "REAL",
"logicalTableId": ""
},
{
"fieldName": "Category",
"fieldCaption": "Category",
"dataType": "STRING",
"logicalTableId": "Orders_ECFCA1FB690A41FE803BC071773BA862"
},
{
"fieldName": "City",
"fieldCaption": "City",
"dataType": "STRING",
"logicalTableId": "Orders_ECFCA1FB690A41FE803BC071773BA862"
}
]