KYLIN-1993 Set default storage_type andengine_type in kylin.properties
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/7d32ecb0 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/7d32ecb0 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/7d32ecb0 Branch: refs/heads/1.5.x-CDH5.7 Commit: 7d32ecb0d7ff52910c8c106dbd244b79c181c428 Parents: 96da2b6 Author: lidongsjtu <lid...@apache.org> Authored: Thu Sep 1 19:15:01 2016 +0800 Committer: lidongsjtu <lid...@apache.org> Committed: Thu Sep 1 19:15:11 2016 +0800 ---------------------------------------------------------------------- build/bin/sample.sh | 10 + .../apache/kylin/common/KylinConfigBase.java | 8 + .../metadata/cube/kylin_sales_cube.json | 12 - .../cube_desc/kylin_sales_cube_desc.json | 183 --------- .../metadata/model_desc/kylin_sales_model.json | 43 -- .../metadata/project/learn_kylin.json | 19 - .../metadata/table/DEFAULT.KYLIN_CAL_DT.json | 408 ------------------- .../table/DEFAULT.KYLIN_CATEGORY_GROUPINGS.json | 152 ------- .../metadata/table/DEFAULT.KYLIN_SALES.json | 44 -- .../template/cube/kylin_sales_cube.json | 12 + .../cube_desc/kylin_sales_cube_desc.json | 183 +++++++++ .../template/model_desc/kylin_sales_model.json | 43 ++ .../template/project/learn_kylin.json | 19 + .../template/table/DEFAULT.KYLIN_CAL_DT.json | 408 +++++++++++++++++++ .../table/DEFAULT.KYLIN_CATEGORY_GROUPINGS.json | 152 +++++++ .../template/table/DEFAULT.KYLIN_SALES.json | 44 ++ 16 files changed, 879 insertions(+), 861 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/7d32ecb0/build/bin/sample.sh ---------------------------------------------------------------------- diff --git a/build/bin/sample.sh b/build/bin/sample.sh index 9939c62..06e05d1 100644 --- a/build/bin/sample.sh +++ b/build/bin/sample.sh @@ -41,6 +41,16 @@ fi echo "Sample hive tables are created successfully; Going to create sample cube..." hadoop fs -rm -r /tmp/kylin/sample_cube +# set engine type and storage type to cube desc +default_engine_type=`sh ${KYLIN_HOME}/bin/get-properties.sh kylin.default.cube.engine` +default_storage_type=`sh ${KYLIN_HOME}/bin/get-properties.sh kylin.default.storage.engine` +if [ -z "$default_engine_type" ]; then + default_engine_type=2 + default_storage_type=2 +fi +export default_engine_type +export default_storage_type + cd ${KYLIN_HOME} hbase org.apache.hadoop.util.RunJar ${job_jar} org.apache.kylin.common.persistence.ResourceTool upload ${KYLIN_HOME}/sample_cube/metadata || { exit 1; } echo "Sample cube is created successfully in project 'learn_kylin'; Restart Kylin server or reload the metadata from web UI to see the change." http://git-wip-us.apache.org/repos/asf/kylin/blob/7d32ecb0/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java ---------------------------------------------------------------------- diff --git a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java index de6b977..1390e24 100644 --- a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java +++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java @@ -738,6 +738,14 @@ abstract public class KylinConfigBase implements Serializable { return r; } + public int getDefaultStorageEngine() { + return Integer.parseInt(getOptional("kylin.default.storage.engine", "2")); + } + + public int getDefaultCubeEngine() { + return Integer.parseInt(getOptional("kylin.default.cube.engine", "2")); + } + public Map<Integer, String> getSchedulers() { Map<Integer, String> r = convertKeyToInteger(getPropertiesByPrefix("kylin.scheduler.")); r.put(0, "org.apache.kylin.job.impl.threadpool.DefaultScheduler"); http://git-wip-us.apache.org/repos/asf/kylin/blob/7d32ecb0/examples/sample_cube/metadata/cube/kylin_sales_cube.json ---------------------------------------------------------------------- diff --git a/examples/sample_cube/metadata/cube/kylin_sales_cube.json b/examples/sample_cube/metadata/cube/kylin_sales_cube.json deleted file mode 100644 index 86042ba..0000000 --- a/examples/sample_cube/metadata/cube/kylin_sales_cube.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "uuid" : "2fbca32a-a33e-4b69-83dd-0bb8b1f8c53b", - - "last_modified" : 0, - "name" : "kylin_sales_cube", - "owner" : null, - "descriptor" : "kylin_sales_cube_desc", - "status" : "DISABLED", - "segments" : [ ], - "create_time" : null, - "auto_merge_time_ranges" : [604800000, 2419200000] -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/kylin/blob/7d32ecb0/examples/sample_cube/metadata/cube_desc/kylin_sales_cube_desc.json ---------------------------------------------------------------------- diff --git a/examples/sample_cube/metadata/cube_desc/kylin_sales_cube_desc.json b/examples/sample_cube/metadata/cube_desc/kylin_sales_cube_desc.json deleted file mode 100644 index b4aa205..0000000 --- a/examples/sample_cube/metadata/cube_desc/kylin_sales_cube_desc.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "uuid" : "0ef9b7a8-3929-4dff-b59d-2100aadc8dbf", - "name" : "kylin_sales_cube_desc", - "description" : null, - "dimensions" : [ { - "name" : "CAL_DT", - "table" : "DEFAULT.KYLIN_CAL_DT", - "column" : "{FK}", - "derived" : [ "WEEK_BEG_DT" ] - }, { - "name" : "CATEGORY", - "table" : "DEFAULT.KYLIN_CATEGORY_GROUPINGS", - "column" : "{FK}", - "derived" : [ "USER_DEFINED_FIELD1", "USER_DEFINED_FIELD3", "UPD_DATE", "UPD_USER" ] - }, { - "name" : "CATEGORY_HIERARCHY", - "table" : "DEFAULT.KYLIN_CATEGORY_GROUPINGS", - "column" : "META_CATEG_NAME", - "derived" : null - }, { - "name" : "CATEGORY_HIERARCHY", - "table" : "DEFAULT.KYLIN_CATEGORY_GROUPINGS", - "column" : "CATEG_LVL2_NAME", - "derived" : null - }, { - "name" : "CATEGORY_HIERARCHY", - "table" : "DEFAULT.KYLIN_CATEGORY_GROUPINGS", - "column" : "CATEG_LVL3_NAME", - "derived" : null - }, { - "name" : "LSTG_FORMAT_NAME", - "table" : "DEFAULT.KYLIN_SALES", - "column" : "LSTG_FORMAT_NAME", - "derived" : null - } ], - "measures" : [ { - "name" : "GMV_SUM", - "function" : { - "expression" : "SUM", - "parameter" : { - "type" : "column", - "value" : "PRICE", - "next_parameter" : null - }, - "returntype" : "decimal(19,4)" - }, - "dependent_measure_ref" : null - }, { - "name" : "GMV_MIN", - "function" : { - "expression" : "MIN", - "parameter" : { - "type" : "column", - "value" : "PRICE", - "next_parameter" : null - }, - "returntype" : "decimal(19,4)" - }, - "dependent_measure_ref" : null - }, { - "name" : "GMV_MAX", - "function" : { - "expression" : "MAX", - "parameter" : { - "type" : "column", - "value" : "PRICE", - "next_parameter" : null - }, - "returntype" : "decimal(19,4)" - }, - "dependent_measure_ref" : null - }, { - "name" : "TRANS_CNT", - "function" : { - "expression" : "COUNT", - "parameter" : { - "type" : "constant", - "value" : "1", - "next_parameter" : null - }, - "returntype" : "bigint" - }, - "dependent_measure_ref" : null - }, { - "name" : "SELLER_CNT_HLL", - "function" : { - "expression" : "COUNT_DISTINCT", - "parameter" : { - "type" : "column", - "value" : "SELLER_ID", - "next_parameter" : null - }, - "returntype" : "hllc(10)" - }, - "dependent_measure_ref" : null - }, { - "name" : "SELLER_FORMAT_CNT", - "function" : { - "expression" : "COUNT_DISTINCT", - "parameter" : { - "type" : "column", - "value" : "LSTG_FORMAT_NAME", - "next_parameter" : null - }, - "returntype" : "hllc(10)" - }, - "dependent_measure_ref" : null - }, { - "name": "TOP_SELLER", - "function": { - "expression": "TOP_N", - "parameter": { - "type": "column", - "value": "PRICE", - "next_parameter": { - "type": "column", - "value": "SELLER_ID", - "next_parameter": null - } - }, - "returntype": "topn(100)" - }, - "dependent_measure_ref": null - } ], - "rowkey" : { - "rowkey_columns" : [ { - "column" : "PART_DT", - "encoding" : "dict" - }, { - "column" : "LEAF_CATEG_ID", - "encoding" : "dict" - }, { - "column" : "META_CATEG_NAME", - "encoding" : "dict" - }, { - "column" : "CATEG_LVL2_NAME", - "encoding" : "dict" - }, { - "column" : "CATEG_LVL3_NAME", - "encoding" : "dict" - }, { - "column" : "LSTG_FORMAT_NAME", - "encoding" : "fixed_length:12" - }, { - "column" : "LSTG_SITE_ID", - "encoding" : "dict" - } ] - }, - "last_modified" : 1451468470824, - "model_name" : "kylin_sales_model", - "null_string" : null, - "hbase_mapping" : { - "column_family" : [ { - "name" : "f1", - "columns" : [ { - "qualifier" : "m", - "measure_refs" : [ "GMV_SUM", "GMV_MIN", "GMV_MAX", "TRANS_CNT" ] - } ] - }, { - "name" : "f2", - "columns" : [ { - "qualifier" : "m", - "measure_refs" : [ "SELLER_CNT_HLL", "SELLER_FORMAT_CNT", "TOP_SELLER" ] - } ] - } ] - }, - "aggregation_groups" : [ { - "includes" : [ "CATEG_LVL2_NAME", "CATEG_LVL3_NAME", "LEAF_CATEG_ID", "LSTG_FORMAT_NAME", "LSTG_SITE_ID", "META_CATEG_NAME", "PART_DT" ], - "select_rule" : { - "hierarchy_dims" : [ [ "META_CATEG_NAME", "CATEG_LVL2_NAME", "CATEG_LVL3_NAME" ] ], - "mandatory_dims" : [ ], - "joint_dims" : [ ] - } - } ], - "notify_list" : null, - "status_need_notify" : [ ], - "auto_merge_time_ranges" : null, - "retention_range" : 0, - "engine_type" : 2, - "storage_type" : 2, - "override_kylin_properties" : { }, - "partition_date_start" : 1325376000000 -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/kylin/blob/7d32ecb0/examples/sample_cube/metadata/model_desc/kylin_sales_model.json ---------------------------------------------------------------------- diff --git a/examples/sample_cube/metadata/model_desc/kylin_sales_model.json b/examples/sample_cube/metadata/model_desc/kylin_sales_model.json deleted file mode 100644 index 7ae47c1..0000000 --- a/examples/sample_cube/metadata/model_desc/kylin_sales_model.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "uuid" : "0928468a-9fab-4185-9a14-6f2e7c74823f", - "name" : "kylin_sales_model", - "lookups" : [ { - "table" : "DEFAULT.KYLIN_CAL_DT", - "join" : { - "type" : "inner", - "primary_key" : [ "CAL_DT" ], - "foreign_key" : [ "PART_DT" ] - } - }, { - "table" : "DEFAULT.KYLIN_CATEGORY_GROUPINGS", - "join" : { - "type" : "inner", - "primary_key" : [ "LEAF_CATEG_ID", "SITE_ID" ], - "foreign_key" : [ "LEAF_CATEG_ID", "LSTG_SITE_ID" ] - } - }], - "dimensions" : [ { - "table" : "DEFAULT.KYLIN_CAL_DT", - "columns" : ["CAL_DT", "WEEK_BEG_DT"] - }, { - "table" : "DEFAULT.KYLIN_CATEGORY_GROUPINGS", - "columns" : [ "USER_DEFINED_FIELD1", "USER_DEFINED_FIELD3", "UPD_DATE", "UPD_USER", "META_CATEG_NAME", "CATEG_LVL2_NAME", "CATEG_LVL3_NAME" ] - }, { - "table" : "DEFAULT.KYLIN_SALES", - "columns" : [ "LSTG_FORMAT_NAME", "SELLER_ID", "PART_DT" ] - } ], - "metrics": [ - "PRICE", - "ITEM_COUNT", - "SELLER_ID", - "LSTG_FORMAT_NAME" - ], - "last_modified" : 1422435345362, - "fact_table" : "DEFAULT.KYLIN_SALES", - "filter_condition" : null, - "partition_desc" : { - "partition_date_column" : "DEFAULT.KYLIN_SALES.PART_DT", - "partition_date_start" : 1325376000000, - "partition_type" : "APPEND" - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/kylin/blob/7d32ecb0/examples/sample_cube/metadata/project/learn_kylin.json ---------------------------------------------------------------------- diff --git a/examples/sample_cube/metadata/project/learn_kylin.json b/examples/sample_cube/metadata/project/learn_kylin.json deleted file mode 100644 index e468214..0000000 --- a/examples/sample_cube/metadata/project/learn_kylin.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "uuid": "2fbca32a-a33e-4b69-83dd-0bb8b1f8c91b", - "name": "learn_kylin", - "realizations": [ - { - "name": "kylin_sales_cube", - "type": "CUBE", - "realization": "kylin_sales_cube" - } - ], - "tables": [ - "DEFAULT.KYLIN_SALES", - "DEFAULT.KYLIN_CAL_DT", - "DEFAULT.KYLIN_CATEGORY_GROUPINGS" - ], - "models": [ - "kylin_sales_model" - ] -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/kylin/blob/7d32ecb0/examples/sample_cube/metadata/table/DEFAULT.KYLIN_CAL_DT.json ---------------------------------------------------------------------- diff --git a/examples/sample_cube/metadata/table/DEFAULT.KYLIN_CAL_DT.json b/examples/sample_cube/metadata/table/DEFAULT.KYLIN_CAL_DT.json deleted file mode 100644 index d197115..0000000 --- a/examples/sample_cube/metadata/table/DEFAULT.KYLIN_CAL_DT.json +++ /dev/null @@ -1,408 +0,0 @@ -{ - "uuid" : "0ff420eb-79ad-40bd-bca9-12d8cd05c60a", - - "name" : "KYLIN_CAL_DT", - "columns" : [ { - "id" : "1", - "name" : "CAL_DT", - "datatype" : "date" - }, { - "id" : "2", - "name" : "YEAR_BEG_DT", - "datatype" : "date" - }, { - "id" : "3", - "name" : "QTR_BEG_DT", - "datatype" : "date" - }, { - "id" : "4", - "name" : "MONTH_BEG_DT", - "datatype" : "date" - }, { - "id" : "5", - "name" : "WEEK_BEG_DT", - "datatype" : "date" - }, { - "id" : "6", - "name" : "AGE_FOR_YEAR_ID", - "datatype" : "smallint" - }, { - "id" : "7", - "name" : "AGE_FOR_QTR_ID", - "datatype" : "smallint" - }, { - "id" : "8", - "name" : "AGE_FOR_MONTH_ID", - "datatype" : "smallint" - }, { - "id" : "9", - "name" : "AGE_FOR_WEEK_ID", - "datatype" : "smallint" - }, { - "id" : "10", - "name" : "AGE_FOR_DT_ID", - "datatype" : "smallint" - }, { - "id" : "11", - "name" : "AGE_FOR_RTL_YEAR_ID", - "datatype" : "smallint" - }, { - "id" : "12", - "name" : "AGE_FOR_RTL_QTR_ID", - "datatype" : "smallint" - }, { - "id" : "13", - "name" : "AGE_FOR_RTL_MONTH_ID", - "datatype" : "smallint" - }, { - "id" : "14", - "name" : "AGE_FOR_RTL_WEEK_ID", - "datatype" : "smallint" - }, { - "id" : "15", - "name" : "AGE_FOR_CS_WEEK_ID", - "datatype" : "smallint" - }, { - "id" : "16", - "name" : "DAY_OF_CAL_ID", - "datatype" : "int" - }, { - "id" : "17", - "name" : "DAY_OF_YEAR_ID", - "datatype" : "smallint" - }, { - "id" : "18", - "name" : "DAY_OF_QTR_ID", - "datatype" : "smallint" - }, { - "id" : "19", - "name" : "DAY_OF_MONTH_ID", - "datatype" : "smallint" - }, { - "id" : "20", - "name" : "DAY_OF_WEEK_ID", - "datatype" : "int" - }, { - "id" : "21", - "name" : "WEEK_OF_YEAR_ID", - "datatype" : "tinyint" - }, { - "id" : "22", - "name" : "WEEK_OF_CAL_ID", - "datatype" : "int" - }, { - "id" : "23", - "name" : "MONTH_OF_QTR_ID", - "datatype" : "tinyint" - }, { - "id" : "24", - "name" : "MONTH_OF_YEAR_ID", - "datatype" : "tinyint" - }, { - "id" : "25", - "name" : "MONTH_OF_CAL_ID", - "datatype" : "smallint" - }, { - "id" : "26", - "name" : "QTR_OF_YEAR_ID", - "datatype" : "tinyint" - }, { - "id" : "27", - "name" : "QTR_OF_CAL_ID", - "datatype" : "smallint" - }, { - "id" : "28", - "name" : "YEAR_OF_CAL_ID", - "datatype" : "smallint" - }, { - "id" : "29", - "name" : "YEAR_END_DT", - "datatype" : "string" - }, { - "id" : "30", - "name" : "QTR_END_DT", - "datatype" : "string" - }, { - "id" : "31", - "name" : "MONTH_END_DT", - "datatype" : "string" - }, { - "id" : "32", - "name" : "WEEK_END_DT", - "datatype" : "string" - }, { - "id" : "33", - "name" : "CAL_DT_NAME", - "datatype" : "string" - }, { - "id" : "34", - "name" : "CAL_DT_DESC", - "datatype" : "string" - }, { - "id" : "35", - "name" : "CAL_DT_SHORT_NAME", - "datatype" : "string" - }, { - "id" : "36", - "name" : "YTD_YN_ID", - "datatype" : "tinyint" - }, { - "id" : "37", - "name" : "QTD_YN_ID", - "datatype" : "tinyint" - }, { - "id" : "38", - "name" : "MTD_YN_ID", - "datatype" : "tinyint" - }, { - "id" : "39", - "name" : "WTD_YN_ID", - "datatype" : "tinyint" - }, { - "id" : "40", - "name" : "SEASON_BEG_DT", - "datatype" : "string" - }, { - "id" : "41", - "name" : "DAY_IN_YEAR_COUNT", - "datatype" : "smallint" - }, { - "id" : "42", - "name" : "DAY_IN_QTR_COUNT", - "datatype" : "tinyint" - }, { - "id" : "43", - "name" : "DAY_IN_MONTH_COUNT", - "datatype" : "tinyint" - }, { - "id" : "44", - "name" : "DAY_IN_WEEK_COUNT", - "datatype" : "tinyint" - }, { - "id" : "45", - "name" : "RTL_YEAR_BEG_DT", - "datatype" : "string" - }, { - "id" : "46", - "name" : "RTL_QTR_BEG_DT", - "datatype" : "string" - }, { - "id" : "47", - "name" : "RTL_MONTH_BEG_DT", - "datatype" : "string" - }, { - "id" : "48", - "name" : "RTL_WEEK_BEG_DT", - "datatype" : "string" - }, { - "id" : "49", - "name" : "CS_WEEK_BEG_DT", - "datatype" : "string" - }, { - "id" : "50", - "name" : "CAL_DATE", - "datatype" : "string" - }, { - "id" : "51", - "name" : "DAY_OF_WEEK", - "datatype" : "string" - }, { - "id" : "52", - "name" : "MONTH_ID", - "datatype" : "string" - }, { - "id" : "53", - "name" : "PRD_DESC", - "datatype" : "string" - }, { - "id" : "54", - "name" : "PRD_FLAG", - "datatype" : "string" - }, { - "id" : "55", - "name" : "PRD_ID", - "datatype" : "string" - }, { - "id" : "56", - "name" : "PRD_IND", - "datatype" : "string" - }, { - "id" : "57", - "name" : "QTR_DESC", - "datatype" : "string" - }, { - "id" : "58", - "name" : "QTR_ID", - "datatype" : "string" - }, { - "id" : "59", - "name" : "QTR_IND", - "datatype" : "string" - }, { - "id" : "60", - "name" : "RETAIL_WEEK", - "datatype" : "string" - }, { - "id" : "61", - "name" : "RETAIL_YEAR", - "datatype" : "string" - }, { - "id" : "62", - "name" : "RETAIL_START_DATE", - "datatype" : "string" - }, { - "id" : "63", - "name" : "RETAIL_WK_END_DATE", - "datatype" : "string" - }, { - "id" : "64", - "name" : "WEEK_IND", - "datatype" : "string" - }, { - "id" : "65", - "name" : "WEEK_NUM_DESC", - "datatype" : "string" - }, { - "id" : "66", - "name" : "WEEK_BEG_DATE", - "datatype" : "string" - }, { - "id" : "67", - "name" : "WEEK_END_DATE", - "datatype" : "string" - }, { - "id" : "68", - "name" : "WEEK_IN_YEAR_ID", - "datatype" : "string" - }, { - "id" : "69", - "name" : "WEEK_ID", - "datatype" : "string" - }, { - "id" : "70", - "name" : "WEEK_BEG_END_DESC_MDY", - "datatype" : "string" - }, { - "id" : "71", - "name" : "WEEK_BEG_END_DESC_MD", - "datatype" : "string" - }, { - "id" : "72", - "name" : "YEAR_ID", - "datatype" : "string" - }, { - "id" : "73", - "name" : "YEAR_IND", - "datatype" : "string" - }, { - "id" : "74", - "name" : "CAL_DT_MNS_1YEAR_DT", - "datatype" : "string" - }, { - "id" : "75", - "name" : "CAL_DT_MNS_2YEAR_DT", - "datatype" : "string" - }, { - "id" : "76", - "name" : "CAL_DT_MNS_1QTR_DT", - "datatype" : "string" - }, { - "id" : "77", - "name" : "CAL_DT_MNS_2QTR_DT", - "datatype" : "string" - }, { - "id" : "78", - "name" : "CAL_DT_MNS_1MONTH_DT", - "datatype" : "string" - }, { - "id" : "79", - "name" : "CAL_DT_MNS_2MONTH_DT", - "datatype" : "string" - }, { - "id" : "80", - "name" : "CAL_DT_MNS_1WEEK_DT", - "datatype" : "string" - }, { - "id" : "81", - "name" : "CAL_DT_MNS_2WEEK_DT", - "datatype" : "string" - }, { - "id" : "82", - "name" : "CURR_CAL_DT_MNS_1YEAR_YN_ID", - "datatype" : "tinyint" - }, { - "id" : "83", - "name" : "CURR_CAL_DT_MNS_2YEAR_YN_ID", - "datatype" : "tinyint" - }, { - "id" : "84", - "name" : "CURR_CAL_DT_MNS_1QTR_YN_ID", - "datatype" : "tinyint" - }, { - "id" : "85", - "name" : "CURR_CAL_DT_MNS_2QTR_YN_ID", - "datatype" : "tinyint" - }, { - "id" : "86", - "name" : "CURR_CAL_DT_MNS_1MONTH_YN_ID", - "datatype" : "tinyint" - }, { - "id" : "87", - "name" : "CURR_CAL_DT_MNS_2MONTH_YN_ID", - "datatype" : "tinyint" - }, { - "id" : "88", - "name" : "CURR_CAL_DT_MNS_1WEEK_YN_IND", - "datatype" : "tinyint" - }, { - "id" : "89", - "name" : "CURR_CAL_DT_MNS_2WEEK_YN_IND", - "datatype" : "tinyint" - }, { - "id" : "90", - "name" : "RTL_MONTH_OF_RTL_YEAR_ID", - "datatype" : "string" - }, { - "id" : "91", - "name" : "RTL_QTR_OF_RTL_YEAR_ID", - "datatype" : "tinyint" - }, { - "id" : "92", - "name" : "RTL_WEEK_OF_RTL_YEAR_ID", - "datatype" : "tinyint" - }, { - "id" : "93", - "name" : "SEASON_OF_YEAR_ID", - "datatype" : "tinyint" - }, { - "id" : "94", - "name" : "YTM_YN_ID", - "datatype" : "tinyint" - }, { - "id" : "95", - "name" : "YTQ_YN_ID", - "datatype" : "tinyint" - }, { - "id" : "96", - "name" : "YTW_YN_ID", - "datatype" : "tinyint" - }, { - "id" : "97", - "name" : "KYLIN_CAL_DT_CRE_DATE", - "datatype" : "string" - }, { - "id" : "98", - "name" : "KYLIN_CAL_DT_CRE_USER", - "datatype" : "string" - }, { - "id" : "99", - "name" : "KYLIN_CAL_DT_UPD_DATE", - "datatype" : "string" - }, { - "id" : "100", - "name" : "KYLIN_CAL_DT_UPD_USER", - "datatype" : "string" - } ], - "database" : "default", - "last_modified" : 0 -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/kylin/blob/7d32ecb0/examples/sample_cube/metadata/table/DEFAULT.KYLIN_CATEGORY_GROUPINGS.json ---------------------------------------------------------------------- diff --git a/examples/sample_cube/metadata/table/DEFAULT.KYLIN_CATEGORY_GROUPINGS.json b/examples/sample_cube/metadata/table/DEFAULT.KYLIN_CATEGORY_GROUPINGS.json deleted file mode 100644 index 8e97309..0000000 --- a/examples/sample_cube/metadata/table/DEFAULT.KYLIN_CATEGORY_GROUPINGS.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "uuid" : "952d11b5-69d9-45d1-92af-227489485e3f", - - "name" : "KYLIN_CATEGORY_GROUPINGS", - "columns" : [ { - "id" : "1", - "name" : "LEAF_CATEG_ID", - "datatype" : "bigint" - }, { - "id" : "2", - "name" : "LEAF_CATEG_NAME", - "datatype" : "string" - }, { - "id" : "3", - "name" : "SITE_ID", - "datatype" : "int" - }, { - "id" : "4", - "name" : "CATEG_BUSN_MGR", - "datatype" : "string" - }, { - "id" : "5", - "name" : "CATEG_BUSN_UNIT", - "datatype" : "string" - }, { - "id" : "6", - "name" : "REGN_CATEG", - "datatype" : "string" - }, { - "id" : "7", - "name" : "USER_DEFINED_FIELD1", - "datatype" : "string" - }, { - "id" : "8", - "name" : "USER_DEFINED_FIELD3", - "datatype" : "string" - }, { - "id" : "9", - "name" : "KYLIN_GROUPINGS_CRE_DATE", - "datatype" : "string" - }, { - "id" : "10", - "name" : "UPD_DATE", - "datatype" : "string" - }, { - "id" : "11", - "name" : "KYLIN_GROUPINGS_CRE_USER", - "datatype" : "string" - }, { - "id" : "12", - "name" : "UPD_USER", - "datatype" : "string" - }, { - "id" : "13", - "name" : "META_CATEG_ID", - "datatype" : "decimal" - }, { - "id" : "14", - "name" : "META_CATEG_NAME", - "datatype" : "string" - }, { - "id" : "15", - "name" : "CATEG_LVL2_ID", - "datatype" : "decimal" - }, { - "id" : "16", - "name" : "CATEG_LVL3_ID", - "datatype" : "decimal" - }, { - "id" : "17", - "name" : "CATEG_LVL4_ID", - "datatype" : "decimal" - }, { - "id" : "18", - "name" : "CATEG_LVL5_ID", - "datatype" : "decimal" - }, { - "id" : "19", - "name" : "CATEG_LVL6_ID", - "datatype" : "decimal" - }, { - "id" : "20", - "name" : "CATEG_LVL7_ID", - "datatype" : "decimal" - }, { - "id" : "21", - "name" : "CATEG_LVL2_NAME", - "datatype" : "string" - }, { - "id" : "22", - "name" : "CATEG_LVL3_NAME", - "datatype" : "string" - }, { - "id" : "23", - "name" : "CATEG_LVL4_NAME", - "datatype" : "string" - }, { - "id" : "24", - "name" : "CATEG_LVL5_NAME", - "datatype" : "string" - }, { - "id" : "25", - "name" : "CATEG_LVL6_NAME", - "datatype" : "string" - }, { - "id" : "26", - "name" : "CATEG_LVL7_NAME", - "datatype" : "string" - }, { - "id" : "27", - "name" : "CATEG_FLAGS", - "datatype" : "decimal" - }, { - "id" : "28", - "name" : "ADULT_CATEG_YN", - "datatype" : "string" - }, { - "id" : "29", - "name" : "DOMAIN_ID", - "datatype" : "decimal" - }, { - "id" : "30", - "name" : "USER_DEFINED_FIELD5", - "datatype" : "string" - }, { - "id" : "31", - "name" : "VCS_ID", - "datatype" : "decimal" - }, { - "id" : "32", - "name" : "GCS_ID", - "datatype" : "decimal" - }, { - "id" : "33", - "name" : "MOVE_TO", - "datatype" : "decimal" - }, { - "id" : "34", - "name" : "SAP_CATEGORY_ID", - "datatype" : "decimal" - }, { - "id" : "35", - "name" : "SRC_ID", - "datatype" : "tinyint" - }, { - "id" : "36", - "name" : "BSNS_VRTCL_NAME", - "datatype" : "string" - } ], - "database" : "DEFAULT", - "last_modified" : 0 -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/kylin/blob/7d32ecb0/examples/sample_cube/metadata/table/DEFAULT.KYLIN_SALES.json ---------------------------------------------------------------------- diff --git a/examples/sample_cube/metadata/table/DEFAULT.KYLIN_SALES.json b/examples/sample_cube/metadata/table/DEFAULT.KYLIN_SALES.json deleted file mode 100644 index 4927343..0000000 --- a/examples/sample_cube/metadata/table/DEFAULT.KYLIN_SALES.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "uuid" : "e286e39e-40d7-44c2-8fa2-41b365522771", - - "name" : "KYLIN_SALES", - "columns" : [ { - "id" : "1", - "name" : "TRANS_ID", - "datatype" : "bigint" - }, { - "id" : "2", - "name" : "PART_DT", - "datatype" : "date" - }, { - "id" : "3", - "name" : "LSTG_FORMAT_NAME", - "datatype" : "string" - }, { - "id" : "4", - "name" : "LEAF_CATEG_ID", - "datatype" : "bigint" - }, { - "id" : "5", - "name" : "LSTG_SITE_ID", - "datatype" : "int" - }, { - "id" : "6", - "name" : "SLR_SEGMENT_CD", - "datatype" : "smallint" - }, { - "id" : "7", - "name" : "PRICE", - "datatype" : "decimal(19,4)" - }, { - "id" : "8", - "name" : "ITEM_COUNT", - "datatype" : "bigint" - }, { - "id" : "9", - "name" : "SELLER_ID", - "datatype" : "bigint" - } ], - "database" : "DEFAULT", - "last_modified" : 0 -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/kylin/blob/7d32ecb0/examples/sample_cube/template/cube/kylin_sales_cube.json ---------------------------------------------------------------------- diff --git a/examples/sample_cube/template/cube/kylin_sales_cube.json b/examples/sample_cube/template/cube/kylin_sales_cube.json new file mode 100644 index 0000000..86042ba --- /dev/null +++ b/examples/sample_cube/template/cube/kylin_sales_cube.json @@ -0,0 +1,12 @@ +{ + "uuid" : "2fbca32a-a33e-4b69-83dd-0bb8b1f8c53b", + + "last_modified" : 0, + "name" : "kylin_sales_cube", + "owner" : null, + "descriptor" : "kylin_sales_cube_desc", + "status" : "DISABLED", + "segments" : [ ], + "create_time" : null, + "auto_merge_time_ranges" : [604800000, 2419200000] +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/kylin/blob/7d32ecb0/examples/sample_cube/template/cube_desc/kylin_sales_cube_desc.json ---------------------------------------------------------------------- diff --git a/examples/sample_cube/template/cube_desc/kylin_sales_cube_desc.json b/examples/sample_cube/template/cube_desc/kylin_sales_cube_desc.json new file mode 100644 index 0000000..0953be6 --- /dev/null +++ b/examples/sample_cube/template/cube_desc/kylin_sales_cube_desc.json @@ -0,0 +1,183 @@ +{ + "uuid" : "0ef9b7a8-3929-4dff-b59d-2100aadc8dbf", + "name" : "kylin_sales_cube_desc", + "description" : null, + "dimensions" : [ { + "name" : "CAL_DT", + "table" : "DEFAULT.KYLIN_CAL_DT", + "column" : "{FK}", + "derived" : [ "WEEK_BEG_DT" ] + }, { + "name" : "CATEGORY", + "table" : "DEFAULT.KYLIN_CATEGORY_GROUPINGS", + "column" : "{FK}", + "derived" : [ "USER_DEFINED_FIELD1", "USER_DEFINED_FIELD3", "UPD_DATE", "UPD_USER" ] + }, { + "name" : "CATEGORY_HIERARCHY", + "table" : "DEFAULT.KYLIN_CATEGORY_GROUPINGS", + "column" : "META_CATEG_NAME", + "derived" : null + }, { + "name" : "CATEGORY_HIERARCHY", + "table" : "DEFAULT.KYLIN_CATEGORY_GROUPINGS", + "column" : "CATEG_LVL2_NAME", + "derived" : null + }, { + "name" : "CATEGORY_HIERARCHY", + "table" : "DEFAULT.KYLIN_CATEGORY_GROUPINGS", + "column" : "CATEG_LVL3_NAME", + "derived" : null + }, { + "name" : "LSTG_FORMAT_NAME", + "table" : "DEFAULT.KYLIN_SALES", + "column" : "LSTG_FORMAT_NAME", + "derived" : null + } ], + "measures" : [ { + "name" : "GMV_SUM", + "function" : { + "expression" : "SUM", + "parameter" : { + "type" : "column", + "value" : "PRICE", + "next_parameter" : null + }, + "returntype" : "decimal(19,4)" + }, + "dependent_measure_ref" : null + }, { + "name" : "GMV_MIN", + "function" : { + "expression" : "MIN", + "parameter" : { + "type" : "column", + "value" : "PRICE", + "next_parameter" : null + }, + "returntype" : "decimal(19,4)" + }, + "dependent_measure_ref" : null + }, { + "name" : "GMV_MAX", + "function" : { + "expression" : "MAX", + "parameter" : { + "type" : "column", + "value" : "PRICE", + "next_parameter" : null + }, + "returntype" : "decimal(19,4)" + }, + "dependent_measure_ref" : null + }, { + "name" : "TRANS_CNT", + "function" : { + "expression" : "COUNT", + "parameter" : { + "type" : "constant", + "value" : "1", + "next_parameter" : null + }, + "returntype" : "bigint" + }, + "dependent_measure_ref" : null + }, { + "name" : "SELLER_CNT_HLL", + "function" : { + "expression" : "COUNT_DISTINCT", + "parameter" : { + "type" : "column", + "value" : "SELLER_ID", + "next_parameter" : null + }, + "returntype" : "hllc(10)" + }, + "dependent_measure_ref" : null + }, { + "name" : "SELLER_FORMAT_CNT", + "function" : { + "expression" : "COUNT_DISTINCT", + "parameter" : { + "type" : "column", + "value" : "LSTG_FORMAT_NAME", + "next_parameter" : null + }, + "returntype" : "hllc(10)" + }, + "dependent_measure_ref" : null + }, { + "name": "TOP_SELLER", + "function": { + "expression": "TOP_N", + "parameter": { + "type": "column", + "value": "PRICE", + "next_parameter": { + "type": "column", + "value": "SELLER_ID", + "next_parameter": null + } + }, + "returntype": "topn(100)" + }, + "dependent_measure_ref": null + } ], + "rowkey" : { + "rowkey_columns" : [ { + "column" : "PART_DT", + "encoding" : "dict" + }, { + "column" : "LEAF_CATEG_ID", + "encoding" : "dict" + }, { + "column" : "META_CATEG_NAME", + "encoding" : "dict" + }, { + "column" : "CATEG_LVL2_NAME", + "encoding" : "dict" + }, { + "column" : "CATEG_LVL3_NAME", + "encoding" : "dict" + }, { + "column" : "LSTG_FORMAT_NAME", + "encoding" : "fixed_length:12" + }, { + "column" : "LSTG_SITE_ID", + "encoding" : "dict" + } ] + }, + "last_modified" : 1451468470824, + "model_name" : "kylin_sales_model", + "null_string" : null, + "hbase_mapping" : { + "column_family" : [ { + "name" : "f1", + "columns" : [ { + "qualifier" : "m", + "measure_refs" : [ "GMV_SUM", "GMV_MIN", "GMV_MAX", "TRANS_CNT" ] + } ] + }, { + "name" : "f2", + "columns" : [ { + "qualifier" : "m", + "measure_refs" : [ "SELLER_CNT_HLL", "SELLER_FORMAT_CNT", "TOP_SELLER" ] + } ] + } ] + }, + "aggregation_groups" : [ { + "includes" : [ "CATEG_LVL2_NAME", "CATEG_LVL3_NAME", "LEAF_CATEG_ID", "LSTG_FORMAT_NAME", "LSTG_SITE_ID", "META_CATEG_NAME", "PART_DT" ], + "select_rule" : { + "hierarchy_dims" : [ [ "META_CATEG_NAME", "CATEG_LVL2_NAME", "CATEG_LVL3_NAME" ] ], + "mandatory_dims" : [ ], + "joint_dims" : [ ] + } + } ], + "notify_list" : null, + "status_need_notify" : [ ], + "auto_merge_time_ranges" : null, + "retention_range" : 0, + "engine_type" : ${default_engine_type}, + "storage_type" : ${default_storage_type}, + "override_kylin_properties" : { }, + "partition_date_start" : 1325376000000 +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/kylin/blob/7d32ecb0/examples/sample_cube/template/model_desc/kylin_sales_model.json ---------------------------------------------------------------------- diff --git a/examples/sample_cube/template/model_desc/kylin_sales_model.json b/examples/sample_cube/template/model_desc/kylin_sales_model.json new file mode 100644 index 0000000..7ae47c1 --- /dev/null +++ b/examples/sample_cube/template/model_desc/kylin_sales_model.json @@ -0,0 +1,43 @@ +{ + "uuid" : "0928468a-9fab-4185-9a14-6f2e7c74823f", + "name" : "kylin_sales_model", + "lookups" : [ { + "table" : "DEFAULT.KYLIN_CAL_DT", + "join" : { + "type" : "inner", + "primary_key" : [ "CAL_DT" ], + "foreign_key" : [ "PART_DT" ] + } + }, { + "table" : "DEFAULT.KYLIN_CATEGORY_GROUPINGS", + "join" : { + "type" : "inner", + "primary_key" : [ "LEAF_CATEG_ID", "SITE_ID" ], + "foreign_key" : [ "LEAF_CATEG_ID", "LSTG_SITE_ID" ] + } + }], + "dimensions" : [ { + "table" : "DEFAULT.KYLIN_CAL_DT", + "columns" : ["CAL_DT", "WEEK_BEG_DT"] + }, { + "table" : "DEFAULT.KYLIN_CATEGORY_GROUPINGS", + "columns" : [ "USER_DEFINED_FIELD1", "USER_DEFINED_FIELD3", "UPD_DATE", "UPD_USER", "META_CATEG_NAME", "CATEG_LVL2_NAME", "CATEG_LVL3_NAME" ] + }, { + "table" : "DEFAULT.KYLIN_SALES", + "columns" : [ "LSTG_FORMAT_NAME", "SELLER_ID", "PART_DT" ] + } ], + "metrics": [ + "PRICE", + "ITEM_COUNT", + "SELLER_ID", + "LSTG_FORMAT_NAME" + ], + "last_modified" : 1422435345362, + "fact_table" : "DEFAULT.KYLIN_SALES", + "filter_condition" : null, + "partition_desc" : { + "partition_date_column" : "DEFAULT.KYLIN_SALES.PART_DT", + "partition_date_start" : 1325376000000, + "partition_type" : "APPEND" + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/kylin/blob/7d32ecb0/examples/sample_cube/template/project/learn_kylin.json ---------------------------------------------------------------------- diff --git a/examples/sample_cube/template/project/learn_kylin.json b/examples/sample_cube/template/project/learn_kylin.json new file mode 100644 index 0000000..e468214 --- /dev/null +++ b/examples/sample_cube/template/project/learn_kylin.json @@ -0,0 +1,19 @@ +{ + "uuid": "2fbca32a-a33e-4b69-83dd-0bb8b1f8c91b", + "name": "learn_kylin", + "realizations": [ + { + "name": "kylin_sales_cube", + "type": "CUBE", + "realization": "kylin_sales_cube" + } + ], + "tables": [ + "DEFAULT.KYLIN_SALES", + "DEFAULT.KYLIN_CAL_DT", + "DEFAULT.KYLIN_CATEGORY_GROUPINGS" + ], + "models": [ + "kylin_sales_model" + ] +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/kylin/blob/7d32ecb0/examples/sample_cube/template/table/DEFAULT.KYLIN_CAL_DT.json ---------------------------------------------------------------------- diff --git a/examples/sample_cube/template/table/DEFAULT.KYLIN_CAL_DT.json b/examples/sample_cube/template/table/DEFAULT.KYLIN_CAL_DT.json new file mode 100644 index 0000000..d197115 --- /dev/null +++ b/examples/sample_cube/template/table/DEFAULT.KYLIN_CAL_DT.json @@ -0,0 +1,408 @@ +{ + "uuid" : "0ff420eb-79ad-40bd-bca9-12d8cd05c60a", + + "name" : "KYLIN_CAL_DT", + "columns" : [ { + "id" : "1", + "name" : "CAL_DT", + "datatype" : "date" + }, { + "id" : "2", + "name" : "YEAR_BEG_DT", + "datatype" : "date" + }, { + "id" : "3", + "name" : "QTR_BEG_DT", + "datatype" : "date" + }, { + "id" : "4", + "name" : "MONTH_BEG_DT", + "datatype" : "date" + }, { + "id" : "5", + "name" : "WEEK_BEG_DT", + "datatype" : "date" + }, { + "id" : "6", + "name" : "AGE_FOR_YEAR_ID", + "datatype" : "smallint" + }, { + "id" : "7", + "name" : "AGE_FOR_QTR_ID", + "datatype" : "smallint" + }, { + "id" : "8", + "name" : "AGE_FOR_MONTH_ID", + "datatype" : "smallint" + }, { + "id" : "9", + "name" : "AGE_FOR_WEEK_ID", + "datatype" : "smallint" + }, { + "id" : "10", + "name" : "AGE_FOR_DT_ID", + "datatype" : "smallint" + }, { + "id" : "11", + "name" : "AGE_FOR_RTL_YEAR_ID", + "datatype" : "smallint" + }, { + "id" : "12", + "name" : "AGE_FOR_RTL_QTR_ID", + "datatype" : "smallint" + }, { + "id" : "13", + "name" : "AGE_FOR_RTL_MONTH_ID", + "datatype" : "smallint" + }, { + "id" : "14", + "name" : "AGE_FOR_RTL_WEEK_ID", + "datatype" : "smallint" + }, { + "id" : "15", + "name" : "AGE_FOR_CS_WEEK_ID", + "datatype" : "smallint" + }, { + "id" : "16", + "name" : "DAY_OF_CAL_ID", + "datatype" : "int" + }, { + "id" : "17", + "name" : "DAY_OF_YEAR_ID", + "datatype" : "smallint" + }, { + "id" : "18", + "name" : "DAY_OF_QTR_ID", + "datatype" : "smallint" + }, { + "id" : "19", + "name" : "DAY_OF_MONTH_ID", + "datatype" : "smallint" + }, { + "id" : "20", + "name" : "DAY_OF_WEEK_ID", + "datatype" : "int" + }, { + "id" : "21", + "name" : "WEEK_OF_YEAR_ID", + "datatype" : "tinyint" + }, { + "id" : "22", + "name" : "WEEK_OF_CAL_ID", + "datatype" : "int" + }, { + "id" : "23", + "name" : "MONTH_OF_QTR_ID", + "datatype" : "tinyint" + }, { + "id" : "24", + "name" : "MONTH_OF_YEAR_ID", + "datatype" : "tinyint" + }, { + "id" : "25", + "name" : "MONTH_OF_CAL_ID", + "datatype" : "smallint" + }, { + "id" : "26", + "name" : "QTR_OF_YEAR_ID", + "datatype" : "tinyint" + }, { + "id" : "27", + "name" : "QTR_OF_CAL_ID", + "datatype" : "smallint" + }, { + "id" : "28", + "name" : "YEAR_OF_CAL_ID", + "datatype" : "smallint" + }, { + "id" : "29", + "name" : "YEAR_END_DT", + "datatype" : "string" + }, { + "id" : "30", + "name" : "QTR_END_DT", + "datatype" : "string" + }, { + "id" : "31", + "name" : "MONTH_END_DT", + "datatype" : "string" + }, { + "id" : "32", + "name" : "WEEK_END_DT", + "datatype" : "string" + }, { + "id" : "33", + "name" : "CAL_DT_NAME", + "datatype" : "string" + }, { + "id" : "34", + "name" : "CAL_DT_DESC", + "datatype" : "string" + }, { + "id" : "35", + "name" : "CAL_DT_SHORT_NAME", + "datatype" : "string" + }, { + "id" : "36", + "name" : "YTD_YN_ID", + "datatype" : "tinyint" + }, { + "id" : "37", + "name" : "QTD_YN_ID", + "datatype" : "tinyint" + }, { + "id" : "38", + "name" : "MTD_YN_ID", + "datatype" : "tinyint" + }, { + "id" : "39", + "name" : "WTD_YN_ID", + "datatype" : "tinyint" + }, { + "id" : "40", + "name" : "SEASON_BEG_DT", + "datatype" : "string" + }, { + "id" : "41", + "name" : "DAY_IN_YEAR_COUNT", + "datatype" : "smallint" + }, { + "id" : "42", + "name" : "DAY_IN_QTR_COUNT", + "datatype" : "tinyint" + }, { + "id" : "43", + "name" : "DAY_IN_MONTH_COUNT", + "datatype" : "tinyint" + }, { + "id" : "44", + "name" : "DAY_IN_WEEK_COUNT", + "datatype" : "tinyint" + }, { + "id" : "45", + "name" : "RTL_YEAR_BEG_DT", + "datatype" : "string" + }, { + "id" : "46", + "name" : "RTL_QTR_BEG_DT", + "datatype" : "string" + }, { + "id" : "47", + "name" : "RTL_MONTH_BEG_DT", + "datatype" : "string" + }, { + "id" : "48", + "name" : "RTL_WEEK_BEG_DT", + "datatype" : "string" + }, { + "id" : "49", + "name" : "CS_WEEK_BEG_DT", + "datatype" : "string" + }, { + "id" : "50", + "name" : "CAL_DATE", + "datatype" : "string" + }, { + "id" : "51", + "name" : "DAY_OF_WEEK", + "datatype" : "string" + }, { + "id" : "52", + "name" : "MONTH_ID", + "datatype" : "string" + }, { + "id" : "53", + "name" : "PRD_DESC", + "datatype" : "string" + }, { + "id" : "54", + "name" : "PRD_FLAG", + "datatype" : "string" + }, { + "id" : "55", + "name" : "PRD_ID", + "datatype" : "string" + }, { + "id" : "56", + "name" : "PRD_IND", + "datatype" : "string" + }, { + "id" : "57", + "name" : "QTR_DESC", + "datatype" : "string" + }, { + "id" : "58", + "name" : "QTR_ID", + "datatype" : "string" + }, { + "id" : "59", + "name" : "QTR_IND", + "datatype" : "string" + }, { + "id" : "60", + "name" : "RETAIL_WEEK", + "datatype" : "string" + }, { + "id" : "61", + "name" : "RETAIL_YEAR", + "datatype" : "string" + }, { + "id" : "62", + "name" : "RETAIL_START_DATE", + "datatype" : "string" + }, { + "id" : "63", + "name" : "RETAIL_WK_END_DATE", + "datatype" : "string" + }, { + "id" : "64", + "name" : "WEEK_IND", + "datatype" : "string" + }, { + "id" : "65", + "name" : "WEEK_NUM_DESC", + "datatype" : "string" + }, { + "id" : "66", + "name" : "WEEK_BEG_DATE", + "datatype" : "string" + }, { + "id" : "67", + "name" : "WEEK_END_DATE", + "datatype" : "string" + }, { + "id" : "68", + "name" : "WEEK_IN_YEAR_ID", + "datatype" : "string" + }, { + "id" : "69", + "name" : "WEEK_ID", + "datatype" : "string" + }, { + "id" : "70", + "name" : "WEEK_BEG_END_DESC_MDY", + "datatype" : "string" + }, { + "id" : "71", + "name" : "WEEK_BEG_END_DESC_MD", + "datatype" : "string" + }, { + "id" : "72", + "name" : "YEAR_ID", + "datatype" : "string" + }, { + "id" : "73", + "name" : "YEAR_IND", + "datatype" : "string" + }, { + "id" : "74", + "name" : "CAL_DT_MNS_1YEAR_DT", + "datatype" : "string" + }, { + "id" : "75", + "name" : "CAL_DT_MNS_2YEAR_DT", + "datatype" : "string" + }, { + "id" : "76", + "name" : "CAL_DT_MNS_1QTR_DT", + "datatype" : "string" + }, { + "id" : "77", + "name" : "CAL_DT_MNS_2QTR_DT", + "datatype" : "string" + }, { + "id" : "78", + "name" : "CAL_DT_MNS_1MONTH_DT", + "datatype" : "string" + }, { + "id" : "79", + "name" : "CAL_DT_MNS_2MONTH_DT", + "datatype" : "string" + }, { + "id" : "80", + "name" : "CAL_DT_MNS_1WEEK_DT", + "datatype" : "string" + }, { + "id" : "81", + "name" : "CAL_DT_MNS_2WEEK_DT", + "datatype" : "string" + }, { + "id" : "82", + "name" : "CURR_CAL_DT_MNS_1YEAR_YN_ID", + "datatype" : "tinyint" + }, { + "id" : "83", + "name" : "CURR_CAL_DT_MNS_2YEAR_YN_ID", + "datatype" : "tinyint" + }, { + "id" : "84", + "name" : "CURR_CAL_DT_MNS_1QTR_YN_ID", + "datatype" : "tinyint" + }, { + "id" : "85", + "name" : "CURR_CAL_DT_MNS_2QTR_YN_ID", + "datatype" : "tinyint" + }, { + "id" : "86", + "name" : "CURR_CAL_DT_MNS_1MONTH_YN_ID", + "datatype" : "tinyint" + }, { + "id" : "87", + "name" : "CURR_CAL_DT_MNS_2MONTH_YN_ID", + "datatype" : "tinyint" + }, { + "id" : "88", + "name" : "CURR_CAL_DT_MNS_1WEEK_YN_IND", + "datatype" : "tinyint" + }, { + "id" : "89", + "name" : "CURR_CAL_DT_MNS_2WEEK_YN_IND", + "datatype" : "tinyint" + }, { + "id" : "90", + "name" : "RTL_MONTH_OF_RTL_YEAR_ID", + "datatype" : "string" + }, { + "id" : "91", + "name" : "RTL_QTR_OF_RTL_YEAR_ID", + "datatype" : "tinyint" + }, { + "id" : "92", + "name" : "RTL_WEEK_OF_RTL_YEAR_ID", + "datatype" : "tinyint" + }, { + "id" : "93", + "name" : "SEASON_OF_YEAR_ID", + "datatype" : "tinyint" + }, { + "id" : "94", + "name" : "YTM_YN_ID", + "datatype" : "tinyint" + }, { + "id" : "95", + "name" : "YTQ_YN_ID", + "datatype" : "tinyint" + }, { + "id" : "96", + "name" : "YTW_YN_ID", + "datatype" : "tinyint" + }, { + "id" : "97", + "name" : "KYLIN_CAL_DT_CRE_DATE", + "datatype" : "string" + }, { + "id" : "98", + "name" : "KYLIN_CAL_DT_CRE_USER", + "datatype" : "string" + }, { + "id" : "99", + "name" : "KYLIN_CAL_DT_UPD_DATE", + "datatype" : "string" + }, { + "id" : "100", + "name" : "KYLIN_CAL_DT_UPD_USER", + "datatype" : "string" + } ], + "database" : "default", + "last_modified" : 0 +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/kylin/blob/7d32ecb0/examples/sample_cube/template/table/DEFAULT.KYLIN_CATEGORY_GROUPINGS.json ---------------------------------------------------------------------- diff --git a/examples/sample_cube/template/table/DEFAULT.KYLIN_CATEGORY_GROUPINGS.json b/examples/sample_cube/template/table/DEFAULT.KYLIN_CATEGORY_GROUPINGS.json new file mode 100644 index 0000000..8e97309 --- /dev/null +++ b/examples/sample_cube/template/table/DEFAULT.KYLIN_CATEGORY_GROUPINGS.json @@ -0,0 +1,152 @@ +{ + "uuid" : "952d11b5-69d9-45d1-92af-227489485e3f", + + "name" : "KYLIN_CATEGORY_GROUPINGS", + "columns" : [ { + "id" : "1", + "name" : "LEAF_CATEG_ID", + "datatype" : "bigint" + }, { + "id" : "2", + "name" : "LEAF_CATEG_NAME", + "datatype" : "string" + }, { + "id" : "3", + "name" : "SITE_ID", + "datatype" : "int" + }, { + "id" : "4", + "name" : "CATEG_BUSN_MGR", + "datatype" : "string" + }, { + "id" : "5", + "name" : "CATEG_BUSN_UNIT", + "datatype" : "string" + }, { + "id" : "6", + "name" : "REGN_CATEG", + "datatype" : "string" + }, { + "id" : "7", + "name" : "USER_DEFINED_FIELD1", + "datatype" : "string" + }, { + "id" : "8", + "name" : "USER_DEFINED_FIELD3", + "datatype" : "string" + }, { + "id" : "9", + "name" : "KYLIN_GROUPINGS_CRE_DATE", + "datatype" : "string" + }, { + "id" : "10", + "name" : "UPD_DATE", + "datatype" : "string" + }, { + "id" : "11", + "name" : "KYLIN_GROUPINGS_CRE_USER", + "datatype" : "string" + }, { + "id" : "12", + "name" : "UPD_USER", + "datatype" : "string" + }, { + "id" : "13", + "name" : "META_CATEG_ID", + "datatype" : "decimal" + }, { + "id" : "14", + "name" : "META_CATEG_NAME", + "datatype" : "string" + }, { + "id" : "15", + "name" : "CATEG_LVL2_ID", + "datatype" : "decimal" + }, { + "id" : "16", + "name" : "CATEG_LVL3_ID", + "datatype" : "decimal" + }, { + "id" : "17", + "name" : "CATEG_LVL4_ID", + "datatype" : "decimal" + }, { + "id" : "18", + "name" : "CATEG_LVL5_ID", + "datatype" : "decimal" + }, { + "id" : "19", + "name" : "CATEG_LVL6_ID", + "datatype" : "decimal" + }, { + "id" : "20", + "name" : "CATEG_LVL7_ID", + "datatype" : "decimal" + }, { + "id" : "21", + "name" : "CATEG_LVL2_NAME", + "datatype" : "string" + }, { + "id" : "22", + "name" : "CATEG_LVL3_NAME", + "datatype" : "string" + }, { + "id" : "23", + "name" : "CATEG_LVL4_NAME", + "datatype" : "string" + }, { + "id" : "24", + "name" : "CATEG_LVL5_NAME", + "datatype" : "string" + }, { + "id" : "25", + "name" : "CATEG_LVL6_NAME", + "datatype" : "string" + }, { + "id" : "26", + "name" : "CATEG_LVL7_NAME", + "datatype" : "string" + }, { + "id" : "27", + "name" : "CATEG_FLAGS", + "datatype" : "decimal" + }, { + "id" : "28", + "name" : "ADULT_CATEG_YN", + "datatype" : "string" + }, { + "id" : "29", + "name" : "DOMAIN_ID", + "datatype" : "decimal" + }, { + "id" : "30", + "name" : "USER_DEFINED_FIELD5", + "datatype" : "string" + }, { + "id" : "31", + "name" : "VCS_ID", + "datatype" : "decimal" + }, { + "id" : "32", + "name" : "GCS_ID", + "datatype" : "decimal" + }, { + "id" : "33", + "name" : "MOVE_TO", + "datatype" : "decimal" + }, { + "id" : "34", + "name" : "SAP_CATEGORY_ID", + "datatype" : "decimal" + }, { + "id" : "35", + "name" : "SRC_ID", + "datatype" : "tinyint" + }, { + "id" : "36", + "name" : "BSNS_VRTCL_NAME", + "datatype" : "string" + } ], + "database" : "DEFAULT", + "last_modified" : 0 +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/kylin/blob/7d32ecb0/examples/sample_cube/template/table/DEFAULT.KYLIN_SALES.json ---------------------------------------------------------------------- diff --git a/examples/sample_cube/template/table/DEFAULT.KYLIN_SALES.json b/examples/sample_cube/template/table/DEFAULT.KYLIN_SALES.json new file mode 100644 index 0000000..4927343 --- /dev/null +++ b/examples/sample_cube/template/table/DEFAULT.KYLIN_SALES.json @@ -0,0 +1,44 @@ +{ + "uuid" : "e286e39e-40d7-44c2-8fa2-41b365522771", + + "name" : "KYLIN_SALES", + "columns" : [ { + "id" : "1", + "name" : "TRANS_ID", + "datatype" : "bigint" + }, { + "id" : "2", + "name" : "PART_DT", + "datatype" : "date" + }, { + "id" : "3", + "name" : "LSTG_FORMAT_NAME", + "datatype" : "string" + }, { + "id" : "4", + "name" : "LEAF_CATEG_ID", + "datatype" : "bigint" + }, { + "id" : "5", + "name" : "LSTG_SITE_ID", + "datatype" : "int" + }, { + "id" : "6", + "name" : "SLR_SEGMENT_CD", + "datatype" : "smallint" + }, { + "id" : "7", + "name" : "PRICE", + "datatype" : "decimal(19,4)" + }, { + "id" : "8", + "name" : "ITEM_COUNT", + "datatype" : "bigint" + }, { + "id" : "9", + "name" : "SELLER_ID", + "datatype" : "bigint" + } ], + "database" : "DEFAULT", + "last_modified" : 0 +} \ No newline at end of file