THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!

Apache Kylin : Analytical Data Warehouse for Big Data

Page tree

Welcome to Kylin Wiki.

Create cube

POST /kylin/api/cubes

Request Body

  • cubeDescData - required. string. cubeDescData to create
  • cubeName - required. string. cubeName to create
  • projectName - required. string. projectName to which cube belongs

Request Sample

{
"cubeDescData":"{\"uuid\": \"0ef9b7a8-3929-4dff-b59d-2100aadc8dbf\",\"last_modified\": 0,\"version\": \"3.0.0.20500\",\"name\": \"kylin_test_cube\",\"is_draft\": false,\"model_name\": \"kylin_sales_model\",\"description\": \"\",\"null_string\": null,\"dimensions\": [{\"name\": \"TRANS_ID\",\"table\": \"KYLIN_SALES\",\"column\": \"TRANS_ID\",\"derived\": null},{\"name\": \"YEAR_BEG_DT\",\"table\": \"KYLIN_CAL_DT\",\"column\": null,\"derived\": [\"YEAR_BEG_DT\"]},{\"name\": \"MONTH_BEG_DT\",\"table\": \"KYLIN_CAL_DT\",\"column\": null,\"derived\": [\"MONTH_BEG_DT\"]},{\"name\": \"WEEK_BEG_DT\",\"table\": \"KYLIN_CAL_DT\",\"column\": null,\"derived\": [\"WEEK_BEG_DT\"]},{\"name\": \"USER_DEFINED_FIELD1\",\"table\": \"KYLIN_CATEGORY_GROUPINGS\",\"column\": null,\"derived\": [\"USER_DEFINED_FIELD1\"]},{\"name\": \"USER_DEFINED_FIELD3\",\"table\": \"KYLIN_CATEGORY_GROUPINGS\",\"column\": null,\"derived\": [\"USER_DEFINED_FIELD3\"]},{\"name\": \"META_CATEG_NAME\",\"table\": \"KYLIN_CATEGORY_GROUPINGS\",\"column\": \"META_CATEG_NAME\",\"derived\": null},{\"name\": \"CATEG_LVL2_NAME\",\"table\": \"KYLIN_CATEGORY_GROUPINGS\",\"column\": \"CATEG_LVL2_NAME\",\"derived\": null},{\"name\": \"CATEG_LVL3_NAME\",\"table\": \"KYLIN_CATEGORY_GROUPINGS\",\"column\": \"CATEG_LVL3_NAME\",\"derived\": null},{\"name\": \"LSTG_FORMAT_NAME\",\"table\": \"KYLIN_SALES\",\"column\": \"LSTG_FORMAT_NAME\",\"derived\": null},{\"name\": \"SELLER_ID\",\"table\": \"KYLIN_SALES\",\"column\": \"SELLER_ID\",\"derived\": null},{\"name\": \"BUYER_ID\",\"table\": \"KYLIN_SALES\",\"column\": \"BUYER_ID\",\"derived\": null},{\"name\": \"ACCOUNT_BUYER_LEVEL\",\"table\": \"BUYER_ACCOUNT\",\"column\": \"ACCOUNT_BUYER_LEVEL\",\"derived\": null},{\"name\": \"ACCOUNT_SELLER_LEVEL\",\"table\": \"SELLER_ACCOUNT\",\"column\": \"ACCOUNT_SELLER_LEVEL\",\"derived\": null},{\"name\": \"BUYER_COUNTRY\",\"table\": \"BUYER_ACCOUNT\",\"column\": \"ACCOUNT_COUNTRY\",\"derived\": null},{\"name\": \"SELLER_COUNTRY\",\"table\": \"SELLER_ACCOUNT\",\"column\": \"ACCOUNT_COUNTRY\",\"derived\": null},{\"name\": \"BUYER_COUNTRY_NAME\",\"table\": \"BUYER_COUNTRY\",\"column\": \"NAME\",\"derived\": null},{\"name\": \"SELLER_COUNTRY_NAME\",\"table\": \"SELLER_COUNTRY\",\"column\": \"NAME\",\"derived\": null},{\"name\": \"OPS_USER_ID\",\"table\": \"KYLIN_SALES\",\"column\": \"OPS_USER_ID\",\"derived\": null},{\"name\": \"OPS_REGION\",\"table\": \"KYLIN_SALES\",\"column\": \"OPS_REGION\",\"derived\": null}],\"measures\": [{\"name\": \"GMV_SUM\",\"function\": {\"expression\": \"SUM\",\"parameter\": {\"type\": \"column\",\"value\": \"KYLIN_SALES.PRICE\"},\"returntype\": \"decimal(19,4)\"}},{\"name\": \"BUYER_LEVEL_SUM\",\"function\": {\"expression\": \"SUM\",\"parameter\": {\"type\": \"column\",\"value\": \"BUYER_ACCOUNT.ACCOUNT_BUYER_LEVEL\"},\"returntype\": \"bigint\"}},{\"name\": \"SELLER_LEVEL_SUM\",\"function\": {\"expression\": \"SUM\",\"parameter\": {\"type\": \"column\",\"value\": \"SELLER_ACCOUNT.ACCOUNT_SELLER_LEVEL\"},\"returntype\": \"bigint\"}},{\"name\": \"TRANS_CNT\",\"function\": {\"expression\": \"COUNT\",\"parameter\": {\"type\": \"constant\",\"value\": \"1\"},\"returntype\": \"bigint\"}},{\"name\": \"SELLER_CNT_HLL\",\"function\": {\"expression\": \"COUNT_DISTINCT\",\"parameter\": {\"type\": \"column\",\"value\": \"KYLIN_SALES.SELLER_ID\"},\"returntype\": \"hllc(10)\"}},{\"name\": \"TOP_SELLER\",\"function\": {\"expression\": \"TOP_N\",\"parameter\": {\"type\": \"column\",\"value\": \"KYLIN_SALES.PRICE\",\"next_parameter\": {\"type\": \"column\",\"value\": \"KYLIN_SALES.SELLER_ID\"}},\"returntype\": \"topn(100)\",\"configuration\": {\"topn.encoding.KYLIN_SALES.SELLER_ID\": \"dict\",\"topn.encoding_version.KYLIN_SALES.SELLER_ID\": \"1\"}}}],\"rowkey\": {\"rowkey_columns\": [{\"column\": \"KYLIN_SALES.BUYER_ID\",\"encoding\": \"integer:4\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"KYLIN_SALES.SELLER_ID\",\"encoding\": \"integer:4\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"KYLIN_SALES.TRANS_ID\",\"encoding\": \"integer:4\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"KYLIN_SALES.PART_DT\",\"encoding\": \"date\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"KYLIN_SALES.LEAF_CATEG_ID\",\"encoding\": \"dict\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"KYLIN_CATEGORY_GROUPINGS.META_CATEG_NAME\",\"encoding\": \"dict\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"KYLIN_CATEGORY_GROUPINGS.CATEG_LVL2_NAME\",\"encoding\": \"dict\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"KYLIN_CATEGORY_GROUPINGS.CATEG_LVL3_NAME\",\"encoding\": \"dict\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"BUYER_ACCOUNT.ACCOUNT_BUYER_LEVEL\",\"encoding\": \"dict\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"SELLER_ACCOUNT.ACCOUNT_SELLER_LEVEL\",\"encoding\": \"dict\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"BUYER_ACCOUNT.ACCOUNT_COUNTRY\",\"encoding\": \"dict\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"SELLER_ACCOUNT.ACCOUNT_COUNTRY\",\"encoding\": \"dict\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"BUYER_COUNTRY.NAME\",\"encoding\": \"dict\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"SELLER_COUNTRY.NAME\",\"encoding\": \"dict\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"KYLIN_SALES.LSTG_FORMAT_NAME\",\"encoding\": \"dict\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"KYLIN_SALES.LSTG_SITE_ID\",\"encoding\": \"dict\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"KYLIN_SALES.OPS_USER_ID\",\"encoding\": \"dict\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"KYLIN_SALES.OPS_REGION\",\"encoding\": \"dict\",\"encoding_version\": 1,\"isShardBy\": false}]},\"hbase_mapping\": {\"column_family\": [{\"name\": \"F1\",\"columns\": [{\"qualifier\": \"M\",\"measure_refs\": [\"GMV_SUM\",\"BUYER_LEVEL_SUM\",\"SELLER_LEVEL_SUM\",\"TRANS_CNT\"]}]},{\"name\": \"F2\",\"columns\": [{\"qualifier\": \"M\",\"measure_refs\": [\"SELLER_CNT_HLL\",\"TOP_SELLER\"]}]}]},\"aggregation_groups\": [{\"includes\": [\"KYLIN_SALES.PART_DT\",\"KYLIN_CATEGORY_GROUPINGS.META_CATEG_NAME\",\"KYLIN_CATEGORY_GROUPINGS.CATEG_LVL2_NAME\",\"KYLIN_CATEGORY_GROUPINGS.CATEG_LVL3_NAME\",\"KYLIN_SALES.LEAF_CATEG_ID\",\"KYLIN_SALES.LSTG_FORMAT_NAME\",\"KYLIN_SALES.LSTG_SITE_ID\",\"KYLIN_SALES.OPS_USER_ID\",\"KYLIN_SALES.OPS_REGION\",\"BUYER_ACCOUNT.ACCOUNT_BUYER_LEVEL\",\"SELLER_ACCOUNT.ACCOUNT_SELLER_LEVEL\",\"BUYER_ACCOUNT.ACCOUNT_COUNTRY\",\"SELLER_ACCOUNT.ACCOUNT_COUNTRY\",\"BUYER_COUNTRY.NAME\",\"SELLER_COUNTRY.NAME\"],\"select_rule\": {\"hierarchy_dims\": [[\"KYLIN_CATEGORY_GROUPINGS.META_CATEG_NAME\",\"KYLIN_CATEGORY_GROUPINGS.CATEG_LVL2_NAME\",\"KYLIN_CATEGORY_GROUPINGS.CATEG_LVL3_NAME\",\"KYLIN_SALES.LEAF_CATEG_ID\"]],\"mandatory_dims\": [\"KYLIN_SALES.PART_DT\"],\"joint_dims\": [[\"BUYER_ACCOUNT.ACCOUNT_COUNTRY\",\"BUYER_COUNTRY.NAME\"],[\"SELLER_ACCOUNT.ACCOUNT_COUNTRY\",\"SELLER_COUNTRY.NAME\"],[\"BUYER_ACCOUNT.ACCOUNT_BUYER_LEVEL\",\"SELLER_ACCOUNT.ACCOUNT_SELLER_LEVEL\"],[\"KYLIN_SALES.LSTG_FORMAT_NAME\",\"KYLIN_SALES.LSTG_SITE_ID\"],[\"KYLIN_SALES.OPS_USER_ID\",\"KYLIN_SALES.OPS_REGION\"]]}}],\"signature\": null,\"notify_list\": [],\"status_need_notify\": [],\"partition_date_start\": 1325376000000,\"partition_date_end\": 3153600000000,\"auto_merge_time_ranges\": [],\"volatile_range\": 0,\"retention_range\": 0,\"engine_type\": 6,\"storage_type\": 4,\"override_kylin_properties\": {\"kylin.cube.aggrgroup.is-mandatory-only-valid\": \"true\",\"kylin.engine.spark.rdd-partition-cut-mb\": \"500\"},\"cuboid_black_list\": [],\"parent_forward\": 3,\"mandatory_dimension_set_list\": [],\"snapshot_table_desc_list\": []}",

"cubeName":"kylin_test_cube",

"project":"learn_kylin"
}

Response Sample

{

"uuid": "7b3faf69-eca8-cc5f-25f9-49b0f0b5d404",

"cubeName": "kylin_test_cube",

"cubeDescData":"{\"uuid\": \"0ef9b7a8-3929-4dff-b59d-2100aadc8dbf\",\"last_modified\": 0,\"version\": \"3.0.0.20500\",\"name\": \"kylin_test_cube\",\"is_draft\": false,\"model_name\": \"kylin_sales_model\",\"description\": \"\",\"null_string\": null,\"dimensions\": [{\"name\": \"TRANS_ID\",\"table\": \"KYLIN_SALES\",\"column\": \"TRANS_ID\",\"derived\": null},{\"name\": \"YEAR_BEG_DT\",\"table\": \"KYLIN_CAL_DT\",\"column\": null,\"derived\": [\"YEAR_BEG_DT\"]},{\"name\": \"MONTH_BEG_DT\",\"table\": \"KYLIN_CAL_DT\",\"column\": null,\"derived\": [\"MONTH_BEG_DT\"]},{\"name\": \"WEEK_BEG_DT\",\"table\": \"KYLIN_CAL_DT\",\"column\": null,\"derived\": [\"WEEK_BEG_DT\"]},{\"name\": \"USER_DEFINED_FIELD1\",\"table\": \"KYLIN_CATEGORY_GROUPINGS\",\"column\": null,\"derived\": [\"USER_DEFINED_FIELD1\"]},{\"name\": \"USER_DEFINED_FIELD3\",\"table\": \"KYLIN_CATEGORY_GROUPINGS\",\"column\": null,\"derived\": [\"USER_DEFINED_FIELD3\"]},{\"name\": \"META_CATEG_NAME\",\"table\": \"KYLIN_CATEGORY_GROUPINGS\",\"column\": \"META_CATEG_NAME\",\"derived\": null},{\"name\": \"CATEG_LVL2_NAME\",\"table\": \"KYLIN_CATEGORY_GROUPINGS\",\"column\": \"CATEG_LVL2_NAME\",\"derived\": null},{\"name\": \"CATEG_LVL3_NAME\",\"table\": \"KYLIN_CATEGORY_GROUPINGS\",\"column\": \"CATEG_LVL3_NAME\",\"derived\": null},{\"name\": \"LSTG_FORMAT_NAME\",\"table\": \"KYLIN_SALES\",\"column\": \"LSTG_FORMAT_NAME\",\"derived\": null},{\"name\": \"SELLER_ID\",\"table\": \"KYLIN_SALES\",\"column\": \"SELLER_ID\",\"derived\": null},{\"name\": \"BUYER_ID\",\"table\": \"KYLIN_SALES\",\"column\": \"BUYER_ID\",\"derived\": null},{\"name\": \"ACCOUNT_BUYER_LEVEL\",\"table\": \"BUYER_ACCOUNT\",\"column\": \"ACCOUNT_BUYER_LEVEL\",\"derived\": null},{\"name\": \"ACCOUNT_SELLER_LEVEL\",\"table\": \"SELLER_ACCOUNT\",\"column\": \"ACCOUNT_SELLER_LEVEL\",\"derived\": null},{\"name\": \"BUYER_COUNTRY\",\"table\": \"BUYER_ACCOUNT\",\"column\": \"ACCOUNT_COUNTRY\",\"derived\": null},{\"name\": \"SELLER_COUNTRY\",\"table\": \"SELLER_ACCOUNT\",\"column\": \"ACCOUNT_COUNTRY\",\"derived\": null},{\"name\": \"BUYER_COUNTRY_NAME\",\"table\": \"BUYER_COUNTRY\",\"column\": \"NAME\",\"derived\": null},{\"name\": \"SELLER_COUNTRY_NAME\",\"table\": \"SELLER_COUNTRY\",\"column\": \"NAME\",\"derived\": null},{\"name\": \"OPS_USER_ID\",\"table\": \"KYLIN_SALES\",\"column\": \"OPS_USER_ID\",\"derived\": null},{\"name\": \"OPS_REGION\",\"table\": \"KYLIN_SALES\",\"column\": \"OPS_REGION\",\"derived\": null}],\"measures\": [{\"name\": \"GMV_SUM\",\"function\": {\"expression\": \"SUM\",\"parameter\": {\"type\": \"column\",\"value\": \"KYLIN_SALES.PRICE\"},\"returntype\": \"decimal(19,4)\"}},{\"name\": \"BUYER_LEVEL_SUM\",\"function\": {\"expression\": \"SUM\",\"parameter\": {\"type\": \"column\",\"value\": \"BUYER_ACCOUNT.ACCOUNT_BUYER_LEVEL\"},\"returntype\": \"bigint\"}},{\"name\": \"SELLER_LEVEL_SUM\",\"function\": {\"expression\": \"SUM\",\"parameter\": {\"type\": \"column\",\"value\": \"SELLER_ACCOUNT.ACCOUNT_SELLER_LEVEL\"},\"returntype\": \"bigint\"}},{\"name\": \"TRANS_CNT\",\"function\": {\"expression\": \"COUNT\",\"parameter\": {\"type\": \"constant\",\"value\": \"1\"},\"returntype\": \"bigint\"}},{\"name\": \"SELLER_CNT_HLL\",\"function\": {\"expression\": \"COUNT_DISTINCT\",\"parameter\": {\"type\": \"column\",\"value\": \"KYLIN_SALES.SELLER_ID\"},\"returntype\": \"hllc(10)\"}},{\"name\": \"TOP_SELLER\",\"function\": {\"expression\": \"TOP_N\",\"parameter\": {\"type\": \"column\",\"value\": \"KYLIN_SALES.PRICE\",\"next_parameter\": {\"type\": \"column\",\"value\": \"KYLIN_SALES.SELLER_ID\"}},\"returntype\": \"topn(100)\",\"configuration\": {\"topn.encoding.KYLIN_SALES.SELLER_ID\": \"dict\",\"topn.encoding_version.KYLIN_SALES.SELLER_ID\": \"1\"}}}],\"rowkey\": {\"rowkey_columns\": [{\"column\": \"KYLIN_SALES.BUYER_ID\",\"encoding\": \"integer:4\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"KYLIN_SALES.SELLER_ID\",\"encoding\": \"integer:4\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"KYLIN_SALES.TRANS_ID\",\"encoding\": \"integer:4\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"KYLIN_SALES.PART_DT\",\"encoding\": \"date\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"KYLIN_SALES.LEAF_CATEG_ID\",\"encoding\": \"dict\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"KYLIN_CATEGORY_GROUPINGS.META_CATEG_NAME\",\"encoding\": \"dict\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"KYLIN_CATEGORY_GROUPINGS.CATEG_LVL2_NAME\",\"encoding\": \"dict\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"KYLIN_CATEGORY_GROUPINGS.CATEG_LVL3_NAME\",\"encoding\": \"dict\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"BUYER_ACCOUNT.ACCOUNT_BUYER_LEVEL\",\"encoding\": \"dict\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"SELLER_ACCOUNT.ACCOUNT_SELLER_LEVEL\",\"encoding\": \"dict\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"BUYER_ACCOUNT.ACCOUNT_COUNTRY\",\"encoding\": \"dict\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"SELLER_ACCOUNT.ACCOUNT_COUNTRY\",\"encoding\": \"dict\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"BUYER_COUNTRY.NAME\",\"encoding\": \"dict\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"SELLER_COUNTRY.NAME\",\"encoding\": \"dict\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"KYLIN_SALES.LSTG_FORMAT_NAME\",\"encoding\": \"dict\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"KYLIN_SALES.LSTG_SITE_ID\",\"encoding\": \"dict\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"KYLIN_SALES.OPS_USER_ID\",\"encoding\": \"dict\",\"encoding_version\": 1,\"isShardBy\": false},{\"column\": \"KYLIN_SALES.OPS_REGION\",\"encoding\": \"dict\",\"encoding_version\": 1,\"isShardBy\": false}]},\"hbase_mapping\": {\"column_family\": [{\"name\": \"F1\",\"columns\": [{\"qualifier\": \"M\",\"measure_refs\": [\"GMV_SUM\",\"BUYER_LEVEL_SUM\",\"SELLER_LEVEL_SUM\",\"TRANS_CNT\"]}]},{\"name\": \"F2\",\"columns\": [{\"qualifier\": \"M\",\"measure_refs\": [\"SELLER_CNT_HLL\",\"TOP_SELLER\"]}]}]},\"aggregation_groups\": [{\"includes\": [\"KYLIN_SALES.PART_DT\",\"KYLIN_CATEGORY_GROUPINGS.META_CATEG_NAME\",\"KYLIN_CATEGORY_GROUPINGS.CATEG_LVL2_NAME\",\"KYLIN_CATEGORY_GROUPINGS.CATEG_LVL3_NAME\",\"KYLIN_SALES.LEAF_CATEG_ID\",\"KYLIN_SALES.LSTG_FORMAT_NAME\",\"KYLIN_SALES.LSTG_SITE_ID\",\"KYLIN_SALES.OPS_USER_ID\",\"KYLIN_SALES.OPS_REGION\",\"BUYER_ACCOUNT.ACCOUNT_BUYER_LEVEL\",\"SELLER_ACCOUNT.ACCOUNT_SELLER_LEVEL\",\"BUYER_ACCOUNT.ACCOUNT_COUNTRY\",\"SELLER_ACCOUNT.ACCOUNT_COUNTRY\",\"BUYER_COUNTRY.NAME\",\"SELLER_COUNTRY.NAME\"],\"select_rule\": {\"hierarchy_dims\": [[\"KYLIN_CATEGORY_GROUPINGS.META_CATEG_NAME\",\"KYLIN_CATEGORY_GROUPINGS.CATEG_LVL2_NAME\",\"KYLIN_CATEGORY_GROUPINGS.CATEG_LVL3_NAME\",\"KYLIN_SALES.LEAF_CATEG_ID\"]],\"mandatory_dims\": [\"KYLIN_SALES.PART_DT\"],\"joint_dims\": [[\"BUYER_ACCOUNT.ACCOUNT_COUNTRY\",\"BUYER_COUNTRY.NAME\"],[\"SELLER_ACCOUNT.ACCOUNT_COUNTRY\",\"SELLER_COUNTRY.NAME\"],[\"BUYER_ACCOUNT.ACCOUNT_BUYER_LEVEL\",\"SELLER_ACCOUNT.ACCOUNT_SELLER_LEVEL\"],[\"KYLIN_SALES.LSTG_FORMAT_NAME\",\"KYLIN_SALES.LSTG_SITE_ID\"],[\"KYLIN_SALES.OPS_USER_ID\",\"KYLIN_SALES.OPS_REGION\"]]}}],\"signature\": null,\"notify_list\": [],\"status_need_notify\": [],\"partition_date_start\": 1325376000000,\"partition_date_end\": 3153600000000,\"auto_merge_time_ranges\": [],\"volatile_range\": 0,\"retention_range\": 0,\"engine_type\": 6,\"storage_type\": 4,\"override_kylin_properties\": {\"kylin.cube.aggrgroup.is-mandatory-only-valid\": \"true\",\"kylin.engine.spark.rdd-partition-cut-mb\": \"500\"},\"cuboid_black_list\": [],\"parent_forward\": 3,\"mandatory_dimension_set_list\": [],\"snapshot_table_desc_list\": []}",

"streamingData": null,

"kafkaData": null,

"successful": true,

"message": null,

"project": "learn_kylin",

"streamingCube": null

}

Update Cube

PUT /kylin/api/cubes

Request Body

(Same as “Create Cube”)

Request Sample

(Same as “Create Cube”)

Response Sample

(Same as “Create Cube”)

List cubes

GET /kylin/api/cubes

Request Body

  • offset -  optional.int. Offset used by pagination
  • limit -  optional.int. Cubes per page.
  • cubeName - optional. string. Keyword for cube names. To find cubes whose name contains this keyword.
  • projectName - optional. string. Project name.

Response Sample

[
    {
        "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 cube

GET /kylin/api/cubes/{cubeName}

Path Variable

  • cubeName - required. string. Cube name to find.

Get cube descriptor

GET /kylin/api/cube_desc/{cubeName}

Path Variable

  • cubeName - required. string. Cube name you want to get desc.

Build cube

PUT /kylin/api/cubes/{cubeName}/build

Path Variable

  • cubeName - required. string. Cube name.

Request Body

  • startTime - required long Start timestamp of data to build, e.g. 1388563200000 for 2014-1-1
  • endTime - required long End timestamp of data to build
  • buildType - required string Supported build type: ‘BUILD’, ‘MERGE’, ‘REFRESH’

Request Sample

{
"startTime":"1423526400000",
"endTime":"1423612800000",
"buildType":"BUILD"
}

Response Sample

{
    "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
}

Enable Cube

PUT /kylin/api/cubes/{cubeName}/enable

Path variable

  • cubeName - required. string. Cube name.

Disable Cube

PUT /kylin/api/cubes/{cubeName}/disable

Path variable

  • cubeName - required. string. Cube name.

Purge Cube

PUT /kylin/api/cubes/{cubeName}/purge

Path variable

  • cubeName - required. string. Cube name.

Delete Segment

DELETE /kylin/api/cubes/{cubeName}/segs/{segmentName}

Auto-merge Segment

PUT /kylin/api/cubes/{cubeName}/automerge

Get sql of a cube

GET /kylin/api/cubes/{cubeName}/sql

Get sql of a cube segment

GET /kylin/api/cubes/{cubeName}/segs/{segmentName}/sql

Force rebuild lookup table snapshot

PUT /kylin/api/cubes/{cubeName}/segs/{segmentName}/refresh_lookup

Path variable

  • cubeName - required. string. Cube name.
  • segmentName - required. string. Segment name.

Request Parameters

  • lookupTable - required. string. Lookup table name.

Clone cube

PUT /kylin/api/cubes/{cubeName}/clone

Path variable

  • cubeName - required. string. The name of cube you want to clone.

Request Body

  • cubeName - required. string. The name of cloned cube.
  • project - required. string. Project cloned cube belong to.

Request Sample

{
"cubeName":"test_clone_cube",
"project":"learn_kylin"
}

Response Sample

{
    "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": {}
}

Delete cube

DELETE /kylin/api/cubes/{cubeName}

Get hbase info

GET /kylin/api/cubes/{cubeName}/hbase

Response Sample

[
    {
        "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
    }
]

















  • No labels