View Table Partitions and Location

GET /api/v1.2/hive/<schema_name>/<table>/partitions

Use this API to get the Hive table partitions and locations.

Required Role

The following users can make this API call:

  • Users who belong to the system-admin or system-user group.
  • Users who belong to a group associated with a role that allows viewing a Hive table definition. See Managing Groups and Managing Roles for more information.

Example

curl -X GET -H "Accept: application/json" -H "Content-type: application/json" -H "X-AUTH-TOKEN: 02a9528b98ad4b0c8abe
50fd4535960d7777g37b18514fffa41017f5dac16e2b" "https://gcp.qubole.com/api/v1.2/hive/default/cars/partitions"

Sample Response

[
     {
        "PART_NAME":"year=2013/month=1",
        "LOCATION":"gs://dev.canopydata.com/sqoop/qa/account_id/4646/warehouse/cars/year=2013/month=1"
     }
]