GET /catalog/{id}

Retrieves a specific catalog entity based on the ID.

Syntax

GET /api/v3/catalog/{id}

Id for a source, space, folder, file or dataset.

Response Output

CatalogEntity

Response Codes

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

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

Example: Get catalog by ID

After requesting the entity by path, we can use its catalog id in subsequent queries. In the following example, the virtual dataset "passenger_counts" is retrieved by its ID, 28bb8400-6f7f-4807-9e7f-cbf0bb21d204.

curl -X GET \
  http://localhost:9047/api/v3/catalog/28bb8400-6f7f-4807-9e7f-cbf0bb21d204 \
  -H "Content-Type: application/json" \
  -H "Authorization: _dremiohs85l11k2mh0b10l51ett9fsca"

Response

For a virtual dataset like this, the response body includes the defining SQL query along with information about the resulting columns/fields.

{
  "entityType": "dataset",
  "id": "28bb8400-6f7f-4807-9e7f-cbf0bb21d204",
  "type": "VIRTUAL_DATASET",
  "path": [
    "sandbox",
    "taxi_queries",
    "passenger_counts"
  ],
  "createdAt": "2019-01-10T16:44:05.323Z",
  "tag": "0",
  "sql": "SELECT COUNT(*) as four_passenger_count\nFROM \"DEV HDFS\".data.nyctaxi.\"yellow_tripdata_2009-01.csv\"\nWHERE \"Passenger_Count\" >= 4",
  "sqlContext": [
    "sandbox",
    "taxi_queries"
  ],
  "accessControlList": {
    "version": 0
  },
  "fields": [
    {
      "name": "four_passenger_count",
      "type": {
        "name": "BIGINT"
      }
    }
  ]
}

results matching ""

    No results matching ""