Apache Kylin : Analytical Data Warehouse for Big Data
Page History
...
POST /kylin/api/cubes
Request Body
Variable name | Necessary | Type | Description |
---|---|---|---|
cubeDescData | yes | string | cubeDescData to create |
cubeName | yes | string | cubeName to create |
projectName | yes | string | projectName to which cube belongs |
- cubeDescData -
required.
string.
cubeDescData to create - cubeName -
required.
string.
cubeName to create - projectName -
required.
string.
projectName to which cube belongs
...
GET /kylin/api/cubes
Request Body
Variable name | Necessary | Type | Description |
---|---|---|---|
offset | no | int | Offset used by pagination |
limit | no | int | Cubes per page |
cubeName | no | string | Keyword for cube names. To find cubes whose name contains this keyword. |
projectName | no | string | Project name. |
Response Sample
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
[ { "uuid": "2fbca32a-a33e-4b69-83dd-0bb8b1f8c53b", "last_modified": 1594810840000, "version": "3.9.9.1", "name": "kylin_sales_cube", "owner": "ADMIN", "descriptor": "kylin_sales_cube", "display_name": null, "cost": 786, "status": "READY", "segments": [ { "uuid": "5d41643a-6178-d7f3-ef91-08592392dc61", "name": "20120101000000_20120201000000", "storage_location_identifier": "36C", "date_range_start": 1325376000000, "date_range_end": 1328054400000, "source_offset_start": 0, "source_offset_end": 0, "status": "READY", "size_kb": 2976, "is_merged": false, "estimate_ratio": null, "input_records": 459, "input_records_size": 1777714, "last_build_time": 1594870043600, "last_build_job_id": "7557fd46-1431-4c88-845a-1b3fd06efe06", "create_time_utc": 1594869860595, "cuboid_shard_nums": { "23471": 1, "21423": 1, "22703": 1, "17327": 1, "16559": 1, "20655": 1, "23792": 1, "32752": 1, "24560": 1, "31984": 1, "23536": 1, "21488": 1, "22768": 1, "17392": 1, "16624": 1, "20720": 1, "23795": 1, "32755": 1, "24563": 1, "31987": 1, "23539": 1, "21491": 1, "22771": 1, "20723": 1, "17395": 1, "16627": 1, "24572": 1, "262143": 1, "32764": 1, "31996": 1, "23548": 1, "23804": 1, "21500": 1, "22780": 1, "17404": 1, "16636": 1, "20732": 1, "23807": 1, "32767": 1, "24575": 1, "31999": 1, "23551": 1, "22783": 1, "21503": 1, "20735": 1, "17407": 1, "16639": 1 }, "total_shards": 0, "blackout_cuboids": [ ], "binary_signature": null, "dictionaries": null, "snapshots": { "DEFAULT.KYLIN_CAL_DT": "learn_kylin/table_snapshot/DEFAULT.KYLIN_CAL_DT/7c810b15-b8a0-4094-99ef-5a3de465ea77", "DEFAULT.KYLIN_CATEGORY_GROUPINGS": "learn_kylin/table_snapshot/DEFAULT.KYLIN_CATEGORY_GROUPINGS/2f18cd7e-7378-465a-87fa-07ccf951232b", "DEFAULT.KYLIN_ACCOUNT": "learn_kylin/table_snapshot/DEFAULT.KYLIN_ACCOUNT/d5ab0a04-58b3-4368-9a8e-2ea309e43aa2", "DEFAULT.KYLIN_COUNTRY": "learn_kylin/table_snapshot/DEFAULT.KYLIN_COUNTRY/304f3e36-2020-42c2-a65b-eef0654a3c73" }, "rowkey_stats": [ ], "stream_source_checkpoint": null, "additionalInfo": { "storageType": "4" } } ], "create_time_utc": 0, "cuboid_bytes": null, "cuboid_bytes_recommend": null, "cuboid_last_optimized": 0, "snapshots": { }, "project": "learn_kylin", "model": "kylin_sales_model", "is_streaming": false, "partitionDateColumn": "KYLIN_SALES.PART_DT", "partitionDateStart": 1325376000000, "isStandardPartitioned": true, "size_kb": 2976, "input_records_count": 459, "input_records_size": 1777714 } ] |
...
GET /kylin/api/cubes/{cubeName}
Path Variable
Variable name | Necessary | Type | Description |
---|---|---|---|
cubeName | yes | string | Cube name to find |
Get cube descriptor
GET /kylin/api/cube_desc/{cubeName}
Path Variable
Variable name | Necessary | Type | Description |
---|---|---|---|
cubeName | yes | string | Cube name you want to get desc |
Build cube
PUT /kylin/api/cubes/{cubeName}/build
Path Variable
Variable name | Necessary | Type | Description |
---|---|---|---|
cubeName | yes | string | Cube name you want to build |
Request Body
Variable name | Necessary | Type | Description |
---|---|---|---|
startTime | yes | long | Start timestamp of data to build, e.g. 1388563200000 for 2014-1-1 |
endTime | yes | long | End timestamp of data to build |
buildType | yes | string | Supported build type: ‘BUILD’, ‘MERGE’, ‘REFRESH’ |
Request Sample
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "startTime": "1423526400000", "endTime": "1423612800000", "buildType": "BUILD" } |
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "uuid": "40216a6a-8b2e-4577-bd02-480438d08277", "last_modified": 1594887791604, "version": "3.9.9.1", "name": "INDEX_BUILD CUBE - kylin_test_cube - 20150210000000_20150211000000 - CST 2020-07-16 16:23:11", "projectName": "learn_kylin", "type": "BUILD", "duration": 0, "related_cube": "kylin_test_cube", "display_cube_name": "kylin_test_cube", "related_segment": "fcbd7527-4d97-9e3c-f88a-ca2c54fbe443", "related_segment_name": null, "exec_start_time": 0, "exec_end_time": 0, "exec_interrupt_time": 0, "mr_waiting": 0, "steps": [ { "interruptCmd": null, "id": "40216a6a-8b2e-4577-bd02-480438d08277-00", "name": "Detect Resource", "sequence_id": 0, "exec_cmd": null, "interrupt_cmd": null, "exec_start_time": 0, "exec_end_time": 0, "exec_wait_time": 0, "step_status": "PENDING", "cmd_type": "SHELL_CMD_HADOOP", "info": {}, "run_async": false }, { "interruptCmd": null, "id": "40216a6a-8b2e-4577-bd02-480438d08277-01", "name": "Build Cube with Spark", "sequence_id": 1, "exec_cmd": null, "interrupt_cmd": null, "exec_start_time": 0, "exec_end_time": 0, "exec_wait_time": 0, "step_status": "PENDING", "cmd_type": "SHELL_CMD_HADOOP", "info": {}, "run_async": false } ], "submitter": "ADMIN", "job_status": "PENDING", "build_instance": "unknown", "progress": 0.0 } |
Optimize Cube
PUT /kylin/api/cubes/{cubeName}/optimize2
Describe: Send a optimize cube job for delete or add cuboid
Path variable
Variable name | Necessary | Type | Description |
---|---|---|---|
cubeName | yes | string | Cube name you want to enable |
Request Body
Variable name | Necessary | Type | Description |
---|---|---|---|
cuboidsAdd | yes | string | The cuboid id you want to add |
cuboidsDelete | yes | string | The cuboid id you want to delete |
Request Sample
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{
"cuboidsAdd":["87361"],
"cuboidsDelete":["16636"]
} |
Response Sample
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
JobInstance xmlns="">
<uuid>2f75ef64-faa7-9c54-8ca7-a6aabd1c8a62</uuid>
<last_modified>1627876186386</last_modified>
<version>4.0.0.0</version>
<name>kylin_sales_cube - OPTIMIZE CHECKPOINT - CST 2021-08-02 11:49:46</name>
<projectName>learn_kylin</projectName>
<type>CHECKPOINT</type>
<duration>0</duration>
<related_cube>kylin_sales_cube</related_cube>
<display_cube_name>kylin_sales_cube</display_cube_name>
<related_segment/>
<related_segment_name/>
<exec_start_time>0</exec_start_time>
<exec_end_time>0</exec_end_time>
<exec_interrupt_time>0</exec_interrupt_time>
<mr_waiting>0</mr_waiting>
<steps>
<steps>
<interruptCmd/>
<id>2f75ef64-faa7-9c54-8ca7-a6aabd1c8a62-00</id>
<name>Update Cube Info</name>
<sequence_id>0</sequence_id>
<exec_cmd/>
<interrupt_cmd/>
<exec_start_time>0</exec_start_time>
<exec_end_time>0</exec_end_time>
<exec_wait_time>0</exec_wait_time>
<step_status>PENDING</step_status>
<cmd_type>SHELL_CMD_HADOOP</cmd_type>
<info></info>
<run_async>false</run_async>
</steps>
<steps>
<interruptCmd/>
<id>2f75ef64-faa7-9c54-8ca7-a6aabd1c8a62-01</id>
<name>Garbage Collection on HDFS</name>
<sequence_id>1</sequence_id>
<exec_cmd/>
<interrupt_cmd/>
<exec_start_time>0</exec_start_time>
<exec_end_time>0</exec_end_time>
<exec_wait_time>0</exec_wait_time>
<step_status>PENDING</step_status>
<cmd_type>SHELL_CMD_HADOOP</cmd_type>
<info></info>
<run_async>false</run_async>
</steps>
</steps>
<submitter>ADMIN</submitter>
<job_status>PENDING</job_status>
<build_instance>unknown</build_instance>
<progress>0.0</progress>
</JobInstance> |
Enable Cube
PUT /kylin/api/cubes/{cubeName}/enable
Path variable
Variable name | Necessary | Type | Description |
---|---|---|---|
cubeName | yes | string | Cube name you want to enable |
Disable Cube
PUT /kylin/api/cubes/{cubeName}/disable
Path variable
Variable name | Necessary | Type | Description |
---|---|---|---|
cubeName | yes | string | Cube name you want to disable |
Purge Cube
PUT /kylin/api/cubes/{cubeName}/purge
Path variable
Variable name | Necessary | Type | Description |
---|---|---|---|
cubeName | yes | string | Cube name you want to purge |
Delete Segment
DELETE /kylin/api/cubes/{cubeName}/segs/{segmentName}
...
PUT /kylin/api/cubes/{cubeName}/segs/{segmentName}/refresh_lookup
Path variable
Variable name | Necessary | Type | Description |
---|---|---|---|
cubeName | yes | string | Cube name you want to rebuild lookup table snapshot |
segmentName | yes | string | Segment name |
Request Parameters
Variable name | Necessary | Type | Description |
---|---|---|---|
lookupTable | yes | string | Lookup table name you want to refresh |
Clone cube
PUT /kylin/api/cubes/{cubeName}/clone
Path variable
Variable name | Necessary | Type | Description |
---|---|---|---|
cubeName | yes | string | The name of cube you want to clone |
Request Body
Variable name | Necessary | Type | Description |
---|---|---|---|
cubeName | yes | string | The name of new cloned cube |
project | yes | string | Project which new cloned cube belong to |
Request Sample
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "cubeName":"test_clone_cube", "project":"learn_kylin" } |
Response Sample
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "uuid": "c4e58e1e-2f44-dd61-4f1f-ef3e4ea68b5b", "last_modified": 1594899272048, "version": "3.9.9.1", "name": "test_clone_cube", "owner": "ADMIN", "descriptor": "test_clone_cube", "display_name": "test_clone_cube", "cost": 50, "status": "DISABLED", "segments": [], "create_time_utc": 1594899272048, "cuboid_bytes": null, "cuboid_bytes_recommend": null, "cuboid_last_optimized": 0, "snapshots": {} } |
...
GET /kylin/api/cubes/{cubeName}/hbase
Response Sample
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
[ { "storageType": "parquet", "segmentName": "20120101000000_20120201000000", "segmentUUID": null, "segmentStatus": "READY", "tableName": "TD4", "tableSize": 0, "regionCount": 0, "dateRangeStart": 1325376000000, "dateRangeEnd": 1328054400000, "sourceOffsetStart": 0, "sourceOffsetEnd": 0, "sourceCount": 459 }, { "storageType": "parquet", "segmentName": "20120201000000_20120301000000", "segmentUUID": null, "segmentStatus": "READY", "tableName": "VVW", "tableSize": 0, "regionCount": 0, "dateRangeStart": 1328054400000, "dateRangeEnd": 1330560000000, "sourceOffsetStart": 0, "sourceOffsetEnd": 0, "sourceCount": 367 } ] |
...
Overview
Content Tools
ThemeBuilder
Apps