GET /catalog/by-path/{path}

Retrieves a catalog entity by path.

Syntax

GET /api/v3/catalog/by-path/{path}

Path is the Dremio path for the entity, using / as a separator. Each path component should be url escaped.

Example Syntax

For example, given a source called MySource which has a folder called MyFolder that contains a dataset called MyDataset, the URL will look like this:

GET /api/v3/catalog/by-path/MySource/MyFolder/MyDataset

If the dataset was called My?Dataset, then the URL will be:

GET /api/v3/catalog/by-path/MySource/MyFolder/My%3FDataset

This is because ? is a special character in URLs and we have to url escape it.

Response Output

CatalogEntity

Response Codes

403 - user does not have permission to view the catalog entity.

404 - a catalog entity with the specified path could not be found.

Example: Get catalog by path

In this example, information is requested about a physical dataset "yellow_tripdata_2009-01.csv", found in the HDFS source called "DEV HDFS" under the directory path data/nyctaxi.

curl -X GET \
    http://localhost:9047/api/v3/catalog/by-path/DEV%20HDFS/data/nyctaxi/yellow_tripdata_2009-01.csv \
    -H "Content-Type: application/json" \
    -H "Authorization: _dremiohs85l11k2mh0b10l51ett9fsca"

Response

For a physical dataset like this, the response body includes information about formatting and datatypes.

{
  "entityType": "dataset",
  "id": "8a2df787-2e28-49ef-b961-52e214672d33",
  "type": "PHYSICAL_DATASET",
  "path": [
    "DEV HDFS",
    "data",
    "nyctaxi",
    "yellow_tripdata_2009-01.csv"
  ],
  "createdAt": "2019-01-10T16:10:29.676Z",
  "tag": "0",
  "format": {
    "type": "Text",
    "ctime": 0,
    "isFolder": false,
    "location": "/data/nyctaxi/yellow_tripdata_2009-01.csv",
    "fieldDelimiter": ",",
    "skipFirstLine": false,
    "extractHeader": true,
    "quote": "\"",
    "comment": "#",
    "escape": "\"",
    "lineDelimiter": "\r\n",
    "autoGenerateColumnNames": true,
    "trimHeader": true
  },
  "accessControlList": {
    "version": 0
  },
  "fields": [
    {
      "name": "Trip_Pickup_DateTime",
      "type": {
        "name": "VARCHAR"
      }
    },
    {
      "name": "Trip_Dropoff_DateTime",
      "type": {
        "name": "VARCHAR"
      }
    },
    {
      "name": "Passenger_Count",
      "type": {
        "name": "VARCHAR"
      }
    },
    {
      "name": "Trip_Distance",
      "type": {
        "name": "VARCHAR"
      }
    },
    {
      "name": "Total_Amt",
      "type": {
        "name": "VARCHAR"
      }
    }
  ],
  "approximateStatisticsAllowed": false
}

results matching ""

    No results matching ""