Apache Kylin : Analytical Data Warehouse for Big Data
Welcome to Kylin Wiki.
- Created by zhangyaqian, last modified on Aug 04, 2020
Create Model
POST /kylin/api/models
Request Body
Variable name | Necessary | Type | Description |
---|---|---|---|
modelDescData | yes | string | modelDescData to create |
modelName | yes | string | modelName to create |
projectName | yes | string | projectName to which model belongs |
Request Sample
Sample Expand source
{ "modelDescData":"{"uuid": "0928468a-9fab-4185-9a14-6f2e7c74823f","last_modified": 0,"version": "3.0.0.20500","name": "kylin_test_model","owner": null,"is_draft": false,"description": "","fact_table": "DEFAULT.KYLIN_SALES","lookups": [{"table": "DEFAULT.KYLIN_CAL_DT","kind": "LOOKUP","alias": "KYLIN_CAL_DT","join": {"type": "inner","primary_key": ["KYLIN_CAL_DT.CAL_DT"],"foreign_key": ["KYLIN_SALES.PART_DT"]}},{"table": "DEFAULT.KYLIN_CATEGORY_GROUPINGS","kind": "LOOKUP","alias": "KYLIN_CATEGORY_GROUPINGS","join": {"type": "inner","primary_key": ["KYLIN_CATEGORY_GROUPINGS.LEAF_CATEG_ID","KYLIN_CATEGORY_GROUPINGS.SITE_ID"],"foreign_key": ["KYLIN_SALES.LEAF_CATEG_ID","KYLIN_SALES.LSTG_SITE_ID"]}},{"table": "DEFAULT.KYLIN_ACCOUNT","kind": "LOOKUP","alias": "BUYER_ACCOUNT","join": {"type": "inner","primary_key": ["BUYER_ACCOUNT.ACCOUNT_ID"],"foreign_key": ["KYLIN_SALES.BUYER_ID"]}},{"table": "DEFAULT.KYLIN_ACCOUNT","kind": "LOOKUP","alias": "SELLER_ACCOUNT","join": {"type": "inner","primary_key": ["SELLER_ACCOUNT.ACCOUNT_ID"],"foreign_key": ["KYLIN_SALES.SELLER_ID"]}},{"table": "DEFAULT.KYLIN_COUNTRY","kind": "LOOKUP","alias": "BUYER_COUNTRY","join": {"type": "inner","primary_key": ["BUYER_COUNTRY.COUNTRY"],"foreign_key": ["BUYER_ACCOUNT.ACCOUNT_COUNTRY"]}},{"table": "DEFAULT.KYLIN_COUNTRY","kind": "LOOKUP","alias": "SELLER_COUNTRY","join": {"type": "inner","primary_key": ["SELLER_COUNTRY.COUNTRY"],"foreign_key": ["SELLER_ACCOUNT.ACCOUNT_COUNTRY"]}}],"dimensions": [{"table": "KYLIN_SALES","columns": ["TRANS_ID","SELLER_ID","BUYER_ID","PART_DT","LEAF_CATEG_ID","LSTG_FORMAT_NAME","LSTG_SITE_ID","OPS_USER_ID","OPS_REGION"]},{"table": "KYLIN_CAL_DT","columns": ["CAL_DT","WEEK_BEG_DT","MONTH_BEG_DT","YEAR_BEG_DT"]},{"table": "KYLIN_CATEGORY_GROUPINGS","columns": ["USER_DEFINED_FIELD1","USER_DEFINED_FIELD3","META_CATEG_NAME","CATEG_LVL2_NAME","CATEG_LVL3_NAME","LEAF_CATEG_ID","SITE_ID"]},{"table": "BUYER_ACCOUNT","columns": ["ACCOUNT_ID","ACCOUNT_BUYER_LEVEL","ACCOUNT_SELLER_LEVEL","ACCOUNT_COUNTRY","ACCOUNT_CONTACT"]},{"table": "SELLER_ACCOUNT","columns": ["ACCOUNT_ID","ACCOUNT_BUYER_LEVEL","ACCOUNT_SELLER_LEVEL","ACCOUNT_COUNTRY","ACCOUNT_CONTACT"]},{"table": "BUYER_COUNTRY","columns": ["COUNTRY","NAME"]},{"table": "SELLER_COUNTRY","columns": ["COUNTRY","NAME"]}],"metrics": ["KYLIN_SALES.PRICE","KYLIN_SALES.ITEM_COUNT"],"filter_condition": "","partition_desc": {"partition_date_column": "KYLIN_SALES.PART_DT","partition_time_column": null,"partition_date_start": 1325376000000,"partition_date_format": "yyyy-MM-dd","partition_time_format": "HH:mm:ss","partition_type": "APPEND","partition_condition_builder": "org.apache.kylin.metadata.model.PartitionDesc$DefaultPartitionConditionBuilder"},"capacity": "MEDIUM"}", "modelName":"kylin_test_model", "project":"learn_kylin" }
Response Sample
Sample Expand source
{ "uuid": "d46b1fb6-5c31-7111-033d-e99600c07a02", "modelName": "kylin_test_model", "modelDescData": "{\"uuid\": \"0928468a-9fab-4185-9a14-6f2e7c74823f\",\"last_modified\": 0,\"version\": \"3.0.0.20500\",\"name\": \"kylin_test_model\",\"owner\": null,\"is_draft\": false,\"description\": \"\",\"fact_table\": \"DEFAULT.KYLIN_SALES\",\"lookups\": [{\"table\": \"DEFAULT.KYLIN_CAL_DT\",\"kind\": \"LOOKUP\",\"alias\": \"KYLIN_CAL_DT\",\"join\": {\"type\": \"inner\",\"primary_key\": [\"KYLIN_CAL_DT.CAL_DT\"],\"foreign_key\": [\"KYLIN_SALES.PART_DT\"]}},{\"table\": \"DEFAULT.KYLIN_CATEGORY_GROUPINGS\",\"kind\": \"LOOKUP\",\"alias\": \"KYLIN_CATEGORY_GROUPINGS\",\"join\": {\"type\": \"inner\",\"primary_key\": [\"KYLIN_CATEGORY_GROUPINGS.LEAF_CATEG_ID\",\"KYLIN_CATEGORY_GROUPINGS.SITE_ID\"],\"foreign_key\": [\"KYLIN_SALES.LEAF_CATEG_ID\",\"KYLIN_SALES.LSTG_SITE_ID\"]}},{\"table\": \"DEFAULT.KYLIN_ACCOUNT\",\"kind\": \"LOOKUP\",\"alias\": \"BUYER_ACCOUNT\",\"join\": {\"type\": \"inner\",\"primary_key\": [\"BUYER_ACCOUNT.ACCOUNT_ID\"],\"foreign_key\": [\"KYLIN_SALES.BUYER_ID\"]}},{\"table\": \"DEFAULT.KYLIN_ACCOUNT\",\"kind\": \"LOOKUP\",\"alias\": \"SELLER_ACCOUNT\",\"join\": {\"type\": \"inner\",\"primary_key\": [\"SELLER_ACCOUNT.ACCOUNT_ID\"],\"foreign_key\": [\"KYLIN_SALES.SELLER_ID\"]}},{\"table\": \"DEFAULT.KYLIN_COUNTRY\",\"kind\": \"LOOKUP\",\"alias\": \"BUYER_COUNTRY\",\"join\": {\"type\": \"inner\",\"primary_key\": [\"BUYER_COUNTRY.COUNTRY\"],\"foreign_key\": [\"BUYER_ACCOUNT.ACCOUNT_COUNTRY\"]}},{\"table\": \"DEFAULT.KYLIN_COUNTRY\",\"kind\": \"LOOKUP\",\"alias\": \"SELLER_COUNTRY\",\"join\": {\"type\": \"inner\",\"primary_key\": [\"SELLER_COUNTRY.COUNTRY\"],\"foreign_key\": [\"SELLER_ACCOUNT.ACCOUNT_COUNTRY\"]}}],\"dimensions\": [{\"table\": \"KYLIN_SALES\",\"columns\": [\"TRANS_ID\",\"SELLER_ID\",\"BUYER_ID\",\"PART_DT\",\"LEAF_CATEG_ID\",\"LSTG_FORMAT_NAME\",\"LSTG_SITE_ID\",\"OPS_USER_ID\",\"OPS_REGION\"]},{\"table\": \"KYLIN_CAL_DT\",\"columns\": [\"CAL_DT\",\"WEEK_BEG_DT\",\"MONTH_BEG_DT\",\"YEAR_BEG_DT\"]},{\"table\": \"KYLIN_CATEGORY_GROUPINGS\",\"columns\": [\"USER_DEFINED_FIELD1\",\"USER_DEFINED_FIELD3\",\"META_CATEG_NAME\",\"CATEG_LVL2_NAME\",\"CATEG_LVL3_NAME\",\"LEAF_CATEG_ID\",\"SITE_ID\"]},{\"table\": \"BUYER_ACCOUNT\",\"columns\": [\"ACCOUNT_ID\",\"ACCOUNT_BUYER_LEVEL\",\"ACCOUNT_SELLER_LEVEL\",\"ACCOUNT_COUNTRY\",\"ACCOUNT_CONTACT\"]},{\"table\": \"SELLER_ACCOUNT\",\"columns\": [\"ACCOUNT_ID\",\"ACCOUNT_BUYER_LEVEL\",\"ACCOUNT_SELLER_LEVEL\",\"ACCOUNT_COUNTRY\",\"ACCOUNT_CONTACT\"]},{\"table\": \"BUYER_COUNTRY\",\"columns\": [\"COUNTRY\",\"NAME\"]},{\"table\": \"SELLER_COUNTRY\",\"columns\": [\"COUNTRY\",\"NAME\"]}],\"metrics\": [\"KYLIN_SALES.PRICE\",\"KYLIN_SALES.ITEM_COUNT\"],\"filter_condition\": \"\",\"partition_desc\": {\"partition_date_column\": \"KYLIN_SALES.PART_DT\",\"partition_time_column\": null,\"partition_date_start\": 1325376000000,\"partition_date_format\": \"yyyy-MM-dd\",\"partition_time_format\": \"HH:mm:ss\",\"partition_type\": \"APPEND\",\"partition_condition_builder\": \"org.apache.kylin.metadata.model.PartitionDesc$DefaultPartitionConditionBuilder\"},\"capacity\": \"MEDIUM\"}", "successful": true, "message": null, "project": "learn_kylin", "ccInCheck": null, "seekingExprAdvice": false }
Update Model
PUT /kylin/api/models
Request Body
Variable name | Necessary | Type | Description |
---|---|---|---|
modelDescData | yes | string | modelDescData to update |
modelName | yes | string | modelName to update |
projectName | yes | string | projectName to which model belongs |
Request Sample
Sample Expand source
{ "modelDescData":"{"uuid": "0928468a-9fab-4185-9a14-6f2e7c74823f","last_modified": 1594953200752,"version": "3.0.0.20500","name": "kylin_test_model","owner": null,"is_draft": false,"description": "","fact_table": "DEFAULT.KYLIN_SALES","lookups": [{"table": "DEFAULT.KYLIN_CAL_DT","kind": "LOOKUP","alias": "KYLIN_CAL_DT","join": {"type": "inner","primary_key": ["KYLIN_CAL_DT.CAL_DT"],"foreign_key": ["KYLIN_SALES.PART_DT"]}},{"table": "DEFAULT.KYLIN_CATEGORY_GROUPINGS","kind": "LOOKUP","alias": "KYLIN_CATEGORY_GROUPINGS","join": {"type": "inner","primary_key": ["KYLIN_CATEGORY_GROUPINGS.LEAF_CATEG_ID","KYLIN_CATEGORY_GROUPINGS.SITE_ID"],"foreign_key": ["KYLIN_SALES.LEAF_CATEG_ID","KYLIN_SALES.LSTG_SITE_ID"]}},{"table": "DEFAULT.KYLIN_ACCOUNT","kind": "LOOKUP","alias": "BUYER_ACCOUNT","join": {"type": "inner","primary_key": ["BUYER_ACCOUNT.ACCOUNT_ID"],"foreign_key": ["KYLIN_SALES.BUYER_ID"]}},{"table": "DEFAULT.KYLIN_ACCOUNT","kind": "LOOKUP","alias": "SELLER_ACCOUNT","join": {"type": "inner","primary_key": ["SELLER_ACCOUNT.ACCOUNT_ID"],"foreign_key": ["KYLIN_SALES.SELLER_ID"]}},{"table": "DEFAULT.KYLIN_COUNTRY","kind": "LOOKUP","alias": "BUYER_COUNTRY","join": {"type": "inner","primary_key": ["BUYER_COUNTRY.COUNTRY"],"foreign_key": ["BUYER_ACCOUNT.ACCOUNT_COUNTRY"]}},{"table": "DEFAULT.KYLIN_COUNTRY","kind": "LOOKUP","alias": "SELLER_COUNTRY","join": {"type": "inner","primary_key": ["SELLER_COUNTRY.COUNTRY"],"foreign_key": ["SELLER_ACCOUNT.ACCOUNT_COUNTRY"]}}],"dimensions": [{"table": "KYLIN_SALES","columns": ["TRANS_ID","SELLER_ID","BUYER_ID","PART_DT","LEAF_CATEG_ID","LSTG_FORMAT_NAME","LSTG_SITE_ID","OPS_USER_ID","OPS_REGION"]},{"table": "KYLIN_CAL_DT","columns": ["CAL_DT","WEEK_BEG_DT","MONTH_BEG_DT","YEAR_BEG_DT"]},{"table": "KYLIN_CATEGORY_GROUPINGS","columns": ["USER_DEFINED_FIELD1","USER_DEFINED_FIELD3","META_CATEG_NAME","CATEG_LVL2_NAME","CATEG_LVL3_NAME","LEAF_CATEG_ID","SITE_ID"]},{"table": "BUYER_ACCOUNT","columns": ["ACCOUNT_ID","ACCOUNT_BUYER_LEVEL","ACCOUNT_SELLER_LEVEL","ACCOUNT_COUNTRY","ACCOUNT_CONTACT"]},{"table": "SELLER_ACCOUNT","columns": ["ACCOUNT_ID","ACCOUNT_BUYER_LEVEL","ACCOUNT_SELLER_LEVEL","ACCOUNT_COUNTRY","ACCOUNT_CONTACT"]},{"table": "BUYER_COUNTRY","columns": ["COUNTRY","NAME"]},{"table": "SELLER_COUNTRY","columns": ["COUNTRY","NAME"]}],"metrics": ["KYLIN_SALES.PRICE","KYLIN_SALES.ITEM_COUNT"],"filter_condition": "","partition_desc": {"partition_date_column": "KYLIN_SALES.PART_DT","partition_time_column": null,"partition_date_start": 1325376000000,"partition_date_format": "yyyy-MM-dd","partition_time_format": "HH:mm:ss","partition_type": "APPEND","partition_condition_builder": "org.apache.kylin.metadata.model.PartitionDesc$DefaultPartitionConditionBuilder"},"capacity": "MEDIUM"}", "modelName":"kylin_test_model", "project":"learn_kylin" }
Response Sample
Sample Expand source
{ "uuid": null, "modelName": "kylin_test_model", "modelDescData": "{\n \"uuid\" : \"0928468a-9fab-4185-9a14-6f2e7c74823f\",\n \"last_modified\" : 1594953221243,\n \"version\" : \"3.0.0.20500\",\n \"name\" : \"kylin_test_model\",\n \"owner\" : null,\n \"is_draft\" : false,\n \"description\" : \"\",\n \"fact_table\" : \"DEFAULT.KYLIN_SALES\",\n \"lookups\" : [ {\n \"table\" : \"DEFAULT.KYLIN_CAL_DT\",\n \"kind\" : \"LOOKUP\",\n \"alias\" : \"KYLIN_CAL_DT\",\n \"join\" : {\n \"type\" : \"inner\",\n \"primary_key\" : [ \"KYLIN_CAL_DT.CAL_DT\" ],\n \"foreign_key\" : [ \"KYLIN_SALES.PART_DT\" ]\n }\n }, {\n \"table\" : \"DEFAULT.KYLIN_CATEGORY_GROUPINGS\",\n \"kind\" : \"LOOKUP\",\n \"alias\" : \"KYLIN_CATEGORY_GROUPINGS\",\n \"join\" : {\n \"type\" : \"inner\",\n \"primary_key\" : [ \"KYLIN_CATEGORY_GROUPINGS.LEAF_CATEG_ID\", \"KYLIN_CATEGORY_GROUPINGS.SITE_ID\" ],\n \"foreign_key\" : [ \"KYLIN_SALES.LEAF_CATEG_ID\", \"KYLIN_SALES.LSTG_SITE_ID\" ]\n }\n }, {\n \"table\" : \"DEFAULT.KYLIN_ACCOUNT\",\n \"kind\" : \"LOOKUP\",\n \"alias\" : \"BUYER_ACCOUNT\",\n \"join\" : {\n \"type\" : \"inner\",\n \"primary_key\" : [ \"BUYER_ACCOUNT.ACCOUNT_ID\" ],\n \"foreign_key\" : [ \"KYLIN_SALES.BUYER_ID\" ]\n }\n }, {\n \"table\" : \"DEFAULT.KYLIN_ACCOUNT\",\n \"kind\" : \"LOOKUP\",\n \"alias\" : \"SELLER_ACCOUNT\",\n \"join\" : {\n \"type\" : \"inner\",\n \"primary_key\" : [ \"SELLER_ACCOUNT.ACCOUNT_ID\" ],\n \"foreign_key\" : [ \"KYLIN_SALES.SELLER_ID\" ]\n }\n }, {\n \"table\" : \"DEFAULT.KYLIN_COUNTRY\",\n \"kind\" : \"LOOKUP\",\n \"alias\" : \"BUYER_COUNTRY\",\n \"join\" : {\n \"type\" : \"inner\",\n \"primary_key\" : [ \"BUYER_COUNTRY.COUNTRY\" ],\n \"foreign_key\" : [ \"BUYER_ACCOUNT.ACCOUNT_COUNTRY\" ]\n }\n }, {\n \"table\" : \"DEFAULT.KYLIN_COUNTRY\",\n \"kind\" : \"LOOKUP\",\n \"alias\" : \"SELLER_COUNTRY\",\n \"join\" : {\n \"type\" : \"inner\",\n \"primary_key\" : [ \"SELLER_COUNTRY.COUNTRY\" ],\n \"foreign_key\" : [ \"SELLER_ACCOUNT.ACCOUNT_COUNTRY\" ]\n }\n } ],\n \"dimensions\" : [ {\n \"table\" : \"KYLIN_SALES\",\n \"columns\" : [ \"TRANS_ID\", \"SELLER_ID\", \"BUYER_ID\", \"PART_DT\", \"LEAF_CATEG_ID\", \"LSTG_FORMAT_NAME\", \"LSTG_SITE_ID\", \"OPS_USER_ID\", \"OPS_REGION\" ]\n }, {\n \"table\" : \"KYLIN_CAL_DT\",\n \"columns\" : [ \"CAL_DT\", \"WEEK_BEG_DT\", \"MONTH_BEG_DT\", \"YEAR_BEG_DT\" ]\n }, {\n \"table\" : \"KYLIN_CATEGORY_GROUPINGS\",\n \"columns\" : [ \"USER_DEFINED_FIELD1\", \"USER_DEFINED_FIELD3\", \"META_CATEG_NAME\", \"CATEG_LVL2_NAME\", \"CATEG_LVL3_NAME\", \"LEAF_CATEG_ID\", \"SITE_ID\" ]\n }, {\n \"table\" : \"BUYER_ACCOUNT\",\n \"columns\" : [ \"ACCOUNT_ID\", \"ACCOUNT_BUYER_LEVEL\", \"ACCOUNT_SELLER_LEVEL\", \"ACCOUNT_COUNTRY\", \"ACCOUNT_CONTACT\" ]\n }, {\n \"table\" : \"SELLER_ACCOUNT\",\n \"columns\" : [ \"ACCOUNT_ID\", \"ACCOUNT_BUYER_LEVEL\", \"ACCOUNT_SELLER_LEVEL\", \"ACCOUNT_COUNTRY\", \"ACCOUNT_CONTACT\" ]\n }, {\n \"table\" : \"BUYER_COUNTRY\",\n \"columns\" : [ \"COUNTRY\", \"NAME\" ]\n }, {\n \"table\" : \"SELLER_COUNTRY\",\n \"columns\" : [ \"COUNTRY\", \"NAME\" ]\n } ],\n \"metrics\" : [ \"KYLIN_SALES.PRICE\", \"KYLIN_SALES.ITEM_COUNT\" ],\n \"filter_condition\" : \"\",\n \"partition_desc\" : {\n \"partition_date_column\" : \"KYLIN_SALES.PART_DT\",\n \"partition_time_column\" : null,\n \"partition_date_start\" : 1325376000000,\n \"partition_date_format\" : \"yyyy-MM-dd\",\n \"partition_time_format\" : \"HH:mm:ss\",\n \"partition_type\" : \"APPEND\",\n \"partition_condition_builder\" : \"org.apache.kylin.metadata.model.PartitionDesc$DefaultPartitionConditionBuilder\"\n },\n \"capacity\" : \"MEDIUM\",\n \"projectName\" : \"learn_kylin\"\n}", "successful": true, "message": null, "project": "learn_kylin", "ccInCheck": null, "seekingExprAdvice": false }
Get ModelDescData
GET /kylin/api/models
Request Parameters
Variable name | Necessary | Type | Description |
---|---|---|---|
modelName | no | string | Model name |
projectName | no | string | Project Name |
limit | no | integer | Offset used by pagination |
offset | no | integer | Models per page |
Request Sample
Sample Expand source
{ "modelName":"kylin_test_model", "projectName":"learn_kylin", "limit":1, "offset":0 }
Response Sample
Sample Expand source
[ { "uuid": "0928468a-9fab-4185-9a14-6f2e7c74823f", "last_modified": 1594953221243, "version": "3.0.0.20500", "name": "kylin_test_model", "owner": null, "is_draft": false, "description": "", "fact_table": "DEFAULT.KYLIN_SALES", "lookups": [ { "table": "DEFAULT.KYLIN_CAL_DT", "kind": "LOOKUP", "alias": "KYLIN_CAL_DT", "join": { "type": "inner", "primary_key": [ "KYLIN_CAL_DT.CAL_DT" ], "foreign_key": [ "KYLIN_SALES.PART_DT" ] } }, { "table": "DEFAULT.KYLIN_CATEGORY_GROUPINGS", "kind": "LOOKUP", "alias": "KYLIN_CATEGORY_GROUPINGS", "join": { "type": "inner", "primary_key": [ "KYLIN_CATEGORY_GROUPINGS.LEAF_CATEG_ID", "KYLIN_CATEGORY_GROUPINGS.SITE_ID" ], "foreign_key": [ "KYLIN_SALES.LEAF_CATEG_ID", "KYLIN_SALES.LSTG_SITE_ID" ] } }, { "table": "DEFAULT.KYLIN_ACCOUNT", "kind": "LOOKUP", "alias": "BUYER_ACCOUNT", "join": { "type": "inner", "primary_key": [ "BUYER_ACCOUNT.ACCOUNT_ID" ], "foreign_key": [ "KYLIN_SALES.BUYER_ID" ] } }, { "table": "DEFAULT.KYLIN_ACCOUNT", "kind": "LOOKUP", "alias": "SELLER_ACCOUNT", "join": { "type": "inner", "primary_key": [ "SELLER_ACCOUNT.ACCOUNT_ID" ], "foreign_key": [ "KYLIN_SALES.SELLER_ID" ] } }, { "table": "DEFAULT.KYLIN_COUNTRY", "kind": "LOOKUP", "alias": "BUYER_COUNTRY", "join": { "type": "inner", "primary_key": [ "BUYER_COUNTRY.COUNTRY" ], "foreign_key": [ "BUYER_ACCOUNT.ACCOUNT_COUNTRY" ] } }, { "table": "DEFAULT.KYLIN_COUNTRY", "kind": "LOOKUP", "alias": "SELLER_COUNTRY", "join": { "type": "inner", "primary_key": [ "SELLER_COUNTRY.COUNTRY" ], "foreign_key": [ "SELLER_ACCOUNT.ACCOUNT_COUNTRY" ] } } ], "dimensions": [ { "table": "KYLIN_SALES", "columns": [ "TRANS_ID", "SELLER_ID", "BUYER_ID", "PART_DT", "LEAF_CATEG_ID", "LSTG_FORMAT_NAME", "LSTG_SITE_ID", "OPS_USER_ID", "OPS_REGION" ] }, { "table": "KYLIN_CAL_DT", "columns": [ "CAL_DT", "WEEK_BEG_DT", "MONTH_BEG_DT", "YEAR_BEG_DT" ] }, { "table": "KYLIN_CATEGORY_GROUPINGS", "columns": [ "USER_DEFINED_FIELD1", "USER_DEFINED_FIELD3", "META_CATEG_NAME", "CATEG_LVL2_NAME", "CATEG_LVL3_NAME", "LEAF_CATEG_ID", "SITE_ID" ] }, { "table": "BUYER_ACCOUNT", "columns": [ "ACCOUNT_ID", "ACCOUNT_BUYER_LEVEL", "ACCOUNT_SELLER_LEVEL", "ACCOUNT_COUNTRY", "ACCOUNT_CONTACT" ] }, { "table": "SELLER_ACCOUNT", "columns": [ "ACCOUNT_ID", "ACCOUNT_BUYER_LEVEL", "ACCOUNT_SELLER_LEVEL", "ACCOUNT_COUNTRY", "ACCOUNT_CONTACT" ] }, { "table": "BUYER_COUNTRY", "columns": [ "COUNTRY", "NAME" ] }, { "table": "SELLER_COUNTRY", "columns": [ "COUNTRY", "NAME" ] } ], "metrics": [ "KYLIN_SALES.PRICE", "KYLIN_SALES.ITEM_COUNT" ], "filter_condition": "", "partition_desc": { "partition_date_column": "KYLIN_SALES.PART_DT", "partition_time_column": null, "partition_date_start": 1325376000000, "partition_date_format": "yyyy-MM-dd", "partition_time_format": "HH:mm:ss", "partition_type": "APPEND", "partition_condition_builder": "org.apache.kylin.metadata.model.PartitionDesc$DefaultPartitionConditionBuilder" }, "capacity": "MEDIUM", "projectName": "learn_kylin" }, { "uuid": "0928468a-9fab-4185-9a14-6f2e7c74823f", "last_modified": 1594810840000, "version": "3.9.9.1", "name": "kylin_sales_model", "owner": null, "is_draft": false, "description": "", "fact_table": "DEFAULT.KYLIN_SALES", "lookups": [ { "table": "DEFAULT.KYLIN_CAL_DT", "kind": "LOOKUP", "alias": "KYLIN_CAL_DT", "join": { "type": "inner", "primary_key": [ "KYLIN_CAL_DT.CAL_DT" ], "foreign_key": [ "KYLIN_SALES.PART_DT" ] } }, { "table": "DEFAULT.KYLIN_CATEGORY_GROUPINGS", "kind": "LOOKUP", "alias": "KYLIN_CATEGORY_GROUPINGS", "join": { "type": "inner", "primary_key": [ "KYLIN_CATEGORY_GROUPINGS.LEAF_CATEG_ID", "KYLIN_CATEGORY_GROUPINGS.SITE_ID" ], "foreign_key": [ "KYLIN_SALES.LEAF_CATEG_ID", "KYLIN_SALES.LSTG_SITE_ID" ] } }, { "table": "DEFAULT.KYLIN_ACCOUNT", "kind": "LOOKUP", "alias": "BUYER_ACCOUNT", "join": { "type": "inner", "primary_key": [ "BUYER_ACCOUNT.ACCOUNT_ID" ], "foreign_key": [ "KYLIN_SALES.BUYER_ID" ] } }, { "table": "DEFAULT.KYLIN_ACCOUNT", "kind": "LOOKUP", "alias": "SELLER_ACCOUNT", "join": { "type": "inner", "primary_key": [ "SELLER_ACCOUNT.ACCOUNT_ID" ], "foreign_key": [ "KYLIN_SALES.SELLER_ID" ] } }, { "table": "DEFAULT.KYLIN_COUNTRY", "kind": "LOOKUP", "alias": "BUYER_COUNTRY", "join": { "type": "inner", "primary_key": [ "BUYER_COUNTRY.COUNTRY" ], "foreign_key": [ "BUYER_ACCOUNT.ACCOUNT_COUNTRY" ] } }, { "table": "DEFAULT.KYLIN_COUNTRY", "kind": "LOOKUP", "alias": "SELLER_COUNTRY", "join": { "type": "inner", "primary_key": [ "SELLER_COUNTRY.COUNTRY" ], "foreign_key": [ "SELLER_ACCOUNT.ACCOUNT_COUNTRY" ] } } ], "dimensions": [ { "table": "KYLIN_SALES", "columns": [ "TRANS_ID", "SELLER_ID", "BUYER_ID", "PART_DT", "LEAF_CATEG_ID", "LSTG_FORMAT_NAME", "LSTG_SITE_ID", "OPS_USER_ID", "OPS_REGION" ] }, { "table": "KYLIN_CAL_DT", "columns": [ "CAL_DT", "WEEK_BEG_DT", "MONTH_BEG_DT", "YEAR_BEG_DT" ] }, { "table": "KYLIN_CATEGORY_GROUPINGS", "columns": [ "USER_DEFINED_FIELD1", "USER_DEFINED_FIELD3", "META_CATEG_NAME", "CATEG_LVL2_NAME", "CATEG_LVL3_NAME", "LEAF_CATEG_ID", "SITE_ID" ] }, { "table": "BUYER_ACCOUNT", "columns": [ "ACCOUNT_ID", "ACCOUNT_BUYER_LEVEL", "ACCOUNT_SELLER_LEVEL", "ACCOUNT_COUNTRY", "ACCOUNT_CONTACT" ] }, { "table": "SELLER_ACCOUNT", "columns": [ "ACCOUNT_ID", "ACCOUNT_BUYER_LEVEL", "ACCOUNT_SELLER_LEVEL", "ACCOUNT_COUNTRY", "ACCOUNT_CONTACT" ] }, { "table": "BUYER_COUNTRY", "columns": [ "COUNTRY", "NAME" ] }, { "table": "SELLER_COUNTRY", "columns": [ "COUNTRY", "NAME" ] } ], "metrics": [ "KYLIN_SALES.PRICE", "KYLIN_SALES.ITEM_COUNT" ], "filter_condition": "", "partition_desc": { "partition_date_column": "KYLIN_SALES.PART_DT", "partition_time_column": null, "partition_date_start": 1325376000000, "partition_date_format": "yyyy-MM-dd", "partition_time_format": "HH:mm:ss", "partition_type": "APPEND", "partition_condition_builder": "org.apache.kylin.metadata.model.PartitionDesc$DefaultPartitionConditionBuilder" }, "capacity": "MEDIUM", "projectName": null }, { "uuid": "ff527b94-f861-44c3-8452-93b177888732", "last_modified": 1594810840000, "version": "3.9.9.1", "name": "kylin_streaming_model", "owner": null, "is_draft": false, "description": null, "fact_table": "DEFAULT.KYLIN_STREAMING_TABLE", "lookups": [], "dimensions": [ { "table": "KYLIN_STREAMING_TABLE", "columns": [ "CATEGORY", "ORDER_TIME", "DEVICE", "USER_AGE", "USER_GENDER", "CURRENCY", "COUNTRY", "MINUTE_START", "HOUR_START", "DAY_START", "WEEK_START", "MONTH_START", "QUARTER_START", "YEAR_START" ] } ], "metrics": [ "KYLIN_STREAMING_TABLE.AMOUNT", "KYLIN_STREAMING_TABLE.QTY" ], "filter_condition": null, "partition_desc": { "partition_date_column": "KYLIN_STREAMING_TABLE.MINUTE_START", "partition_time_column": null, "partition_date_start": 0, "partition_date_format": "yyyy-MM-dd", "partition_time_format": "HH:mm:ss", "partition_type": "APPEND", "partition_condition_builder": "org.apache.kylin.metadata.model.PartitionDesc$DefaultPartitionConditionBuilder" }, "capacity": "MEDIUM", "projectName": null } ]
Delete Model
DELETE /kylin/api/models/{modelName}
Path variable
Variable name | Necessary | Type | Description |
---|---|---|---|
modelName | yes | string | Model name you want to delete |
Clone Model
PUT /kylin/api/models/{modelName}/clone
Path variable
- modelName -
required.
string.
Model name you want to clone.
Request Body
Variable name | Necessary | Type | Description |
---|---|---|---|
modelName | yes | string | New cloned model name |
project | yes | string | Project name which cloned model blongs |
Request Sample
Sample Expand source
{ "modelName":"test_clone_model", "project":"learn_kylin" }
Response Sample
Sample Expand source
{ "uuid": "c4af590d-406f-86b0-2305-7d5d33e9ef70", "modelName": "test_clone_model", "modelDescData": null, "successful": true, "message": null, "project": "learn_kylin", "ccInCheck": null, "seekingExprAdvice": false }
Overview
Content Tools
ThemeBuilder
Apps
- No labels
Bring OLAP Back to Big Data!