Get Data Source Information


🕐 3 min read

Find the data source LUID

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.

Option 1: Get the LUID using Tableau Cloud or Tableau Server

  1. In the Tableau navigation menu, select Explore.
  2. At the top of the Explore screen, select All Data Sources in the dropdown menu.
  3. In the list of data sources, select the data source you want the LUID for.
  4. On the data source page, select the Details icon (Details icon) next to the data source name.

The LUID is at the bottom of the Data Source Details screen.

Tableau Data Source Details screen with the data source LUID emphasized

Option 2: Get the LUID using the Tableau REST API

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 associated id of the contentURL is your data source LUID.

Get the data structure in the data source

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": "",
    }
}

Request data source metadata output

This API endpoint returns a list of fields with:

Example output

{
    "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"
        }
]