Store Table Properties
- POST /api/v1.2/hive/schema/table
Modify metadata of tables in the given schema of the hive metastore.
Required Role
The following users can make this API call:
Users who belong to the system-admin group.
Users who belong to a group associated with a role that allows modifying Hive table metadata in Qubole. See Managing Groups and Managing Roles for more information.
Parameters
Note
Parameters marked in bold below are mandatory. Others are optional and have default values.
Parameter |
Description |
---|---|
interval |
Number representing the interval at which data is loaded. |
interval_unit |
Unit of the interval. Valid values are minutes, hours, days, weeks and months. |
columns |
JSON Hash with Date/Time Format of partition columns. Date format should be a valid input to the strftime function. If there are no partition columns, then it should be an empty hash. For partition columns that are not date/time, the value should be an empty string. |
Example
Imagine a table daily_tick_data in the default hive schema that has the following partitions
stock_exchange
stock_symbol
year
date
$ cat payload.json
{
"interval": 1,
"interval_unit": "days",
"columns": {
"stock_exchange": "",
"stock_symbol": "",
"year": "%Y",
"date": "%Y-%m-%d"
}
}
$ curl -i -X POST -H "Accept: application/json" \
-H "Content-type: application/json" \
-H "X-AUTH-TOKEN: $AUTH_TOKEN" \
--data @payload.json \
https://api.qubole.com/api/v1.2/hive/default/daily_tick_data/properties
Note
The above syntax uses https://api.qubole.com as the endpoint. Qubole provides other endpoints to access QDS that are described in Supported Qubole Endpoints on Different Cloud Providers.
Response
{"status":"successful"}