KYLIN-2295 Refactor CI, blend view cubes into the rest
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/6f563df4 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/6f563df4 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/6f563df4 Branch: refs/heads/master Commit: 6f563df4afa46af61ffcbbc3ad599098b737d07a Parents: 4ae4333 Author: Yang Li <liy...@apache.org> Authored: Sun Dec 18 20:24:25 2016 +0800 Committer: Li Yang <liy...@apache.org> Committed: Mon Dec 19 16:03:22 2016 +0800 ---------------------------------------------------------------------- .../java/org/apache/kylin/job/DeployUtil.java | 22 +- .../kylin/source/datagen/ColumnGenConfig.java | 18 +- .../source/datagen/ModelDataGenerator.java | 10 +- .../kylin/source/datagen/TableGenConfig.java | 5 +- ...t_kylin_cube_with_view_inner_join_empty.json | 10 - ...st_kylin_cube_with_view_left_join_empty.json | 10 - ...st_kylin_cube_with_view_inner_join_desc.json | 169 ---- ...est_kylin_cube_with_view_left_join_desc.json | 169 ---- .../localmeta/data/EDW.TEST_SELLER_TYPE_DIM.csv | 8 - .../data/EDW.TEST_SELLER_TYPE_DIM_TABLE.csv | 8 + .../test_kylin_inner_join_view_model_desc.json | 119 --- .../test_kylin_left_join_view_model_desc.json | 119 --- .../localmeta/project/default.json | 14 +- .../table/DEFAULT.TEST_CATEGORY_GROUPINGS.json | 302 +++---- .../table/DEFAULT.TEST_KYLIN_COUNTRY.json | 46 +- .../table/DEFAULT.TEST_KYLIN_FACT.json | 133 +-- .../localmeta/table/EDW.TEST_CAL_DT.json | 814 +++++++++---------- .../table/EDW.TEST_SELLER_TYPE_DIM.json | 86 +- .../table/EDW.TEST_SELLER_TYPE_DIM_TABLE.json | 43 + .../localmeta/table/EDW.TEST_SITES.json | 94 +-- .../localmeta/table/EDW.V_TEST_CAL_DT.json | 409 ---------- .../localmeta/table/SNOWTEST.KYLIN_CAL_DT.json | 814 +++++++++---------- .../SNOWTEST.KYLIN_CATEGORY_GROUPINGS.json | 298 +++---- .../localmeta/table/SNOWTEST.KYLIN_COUNTRY.json | 46 +- .../localmeta/table/SNOWTEST.KYLIN_SALES.json | 112 +-- .../kylin/provision/BuildCubeWithEngine.java | 83 +- .../java/org/apache/kylin/query/H2Database.java | 14 +- .../apache/kylin/query/ITKylinQueryTest.java | 2 +- .../org/apache/kylin/query/KylinTestBase.java | 1 - 29 files changed, 1498 insertions(+), 2480 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/6f563df4/assembly/src/test/java/org/apache/kylin/job/DeployUtil.java ---------------------------------------------------------------------- diff --git a/assembly/src/test/java/org/apache/kylin/job/DeployUtil.java b/assembly/src/test/java/org/apache/kylin/job/DeployUtil.java index 8fc583d..c8b0d43 100644 --- a/assembly/src/test/java/org/apache/kylin/job/DeployUtil.java +++ b/assembly/src/test/java/org/apache/kylin/job/DeployUtil.java @@ -122,13 +122,13 @@ public class DeployUtil { // ============================================================================ static final String TABLE_CAL_DT = "edw.test_cal_dt"; - static final String VIEW_CAL_DT = "edw.v_test_cal_dt"; static final String TABLE_CATEGORY_GROUPINGS = "default.test_category_groupings"; static final String TABLE_KYLIN_FACT = "default.test_kylin_fact"; - static final String TABLE_SELLER_TYPE_DIM = "edw.test_seller_type_dim"; + static final String VIEW_SELLER_TYPE_DIM = "edw.test_seller_type_dim"; + static final String TABLE_SELLER_TYPE_DIM_TABLE = "edw.test_seller_type_dim_table"; static final String TABLE_SITES = "edw.test_sites"; - static final String[] TABLE_NAMES = new String[] { TABLE_CAL_DT, TABLE_CATEGORY_GROUPINGS, TABLE_KYLIN_FACT, TABLE_SELLER_TYPE_DIM, TABLE_SITES }; + static final String[] TABLE_NAMES = new String[] { TABLE_CAL_DT, TABLE_CATEGORY_GROUPINGS, TABLE_KYLIN_FACT, TABLE_SELLER_TYPE_DIM_TABLE, TABLE_SITES }; public static void prepareTestDataForNormalCubes(String cubeName) throws Exception { @@ -230,7 +230,7 @@ public class DeployUtil { hiveClient.executeHQL(generateCreateTableHql(metaMgr.getTableDesc(TABLE_CAL_DT.toUpperCase()))); hiveClient.executeHQL(generateCreateTableHql(metaMgr.getTableDesc(TABLE_CATEGORY_GROUPINGS.toUpperCase()))); hiveClient.executeHQL(generateCreateTableHql(metaMgr.getTableDesc(TABLE_KYLIN_FACT.toUpperCase()))); - hiveClient.executeHQL(generateCreateTableHql(metaMgr.getTableDesc(TABLE_SELLER_TYPE_DIM.toUpperCase()))); + hiveClient.executeHQL(generateCreateTableHql(metaMgr.getTableDesc(TABLE_SELLER_TYPE_DIM_TABLE.toUpperCase()))); hiveClient.executeHQL(generateCreateTableHql(metaMgr.getTableDesc(TABLE_SITES.toUpperCase()))); // load data to hive tables @@ -238,11 +238,11 @@ public class DeployUtil { hiveClient.executeHQL(generateLoadDataHql(TABLE_CAL_DT, tableFileDir)); hiveClient.executeHQL(generateLoadDataHql(TABLE_CATEGORY_GROUPINGS, tableFileDir)); hiveClient.executeHQL(generateLoadDataHql(TABLE_KYLIN_FACT, tableFileDir)); - hiveClient.executeHQL(generateLoadDataHql(TABLE_SELLER_TYPE_DIM, tableFileDir)); + hiveClient.executeHQL(generateLoadDataHql(TABLE_SELLER_TYPE_DIM_TABLE, tableFileDir)); hiveClient.executeHQL(generateLoadDataHql(TABLE_SITES, tableFileDir)); final HiveCmdBuilder hiveCmdBuilder = new HiveCmdBuilder(); - hiveCmdBuilder.addStatements(generateCreateViewHql(VIEW_CAL_DT, metaMgr.getTableDesc(TABLE_CAL_DT.toUpperCase()))); + hiveCmdBuilder.addStatements(generateCreateViewHql(VIEW_SELLER_TYPE_DIM, TABLE_SELLER_TYPE_DIM_TABLE)); config().getCliCommandExecutor().execute(hiveCmdBuilder.build()); } @@ -274,14 +274,14 @@ public class DeployUtil { return new String[] { dropsql, ddl.toString() }; } - private static String[] generateCreateViewHql(String viewName, TableDesc tableDesc) { + private static String[] generateCreateViewHql(String viewName, String tableName) { - String dropsql = "DROP VIEW IF EXISTS " + viewName + ";"; - StringBuilder ddl = new StringBuilder(); + String dropView = "DROP VIEW IF EXISTS " + viewName + ";\n"; + String dropTable = "DROP TABLE IF EXISTS " + viewName + ";\n"; - ddl.append("CREATE VIEW " + viewName + " AS SELECT * FROM " + tableDesc.getIdentity() + ";\n"); + String createSql = ("CREATE VIEW " + viewName + " AS SELECT * FROM " + tableName + ";\n"); - return new String[] { dropsql, ddl.toString() }; + return new String[] { dropView, dropTable, createSql }; } private static String getHiveDataType(String javaDataType) { http://git-wip-us.apache.org/repos/asf/kylin/blob/6f563df4/core-metadata/src/main/java/org/apache/kylin/source/datagen/ColumnGenConfig.java ---------------------------------------------------------------------- diff --git a/core-metadata/src/main/java/org/apache/kylin/source/datagen/ColumnGenConfig.java b/core-metadata/src/main/java/org/apache/kylin/source/datagen/ColumnGenConfig.java index 6387873..62fe46c 100644 --- a/core-metadata/src/main/java/org/apache/kylin/source/datagen/ColumnGenConfig.java +++ b/core-metadata/src/main/java/org/apache/kylin/source/datagen/ColumnGenConfig.java @@ -23,6 +23,8 @@ import java.util.Arrays; import java.util.List; import java.util.Map; +import org.apache.kylin.common.KylinConfig; +import org.apache.kylin.metadata.MetadataManager; import org.apache.kylin.metadata.model.ColumnDesc; public class ColumnGenConfig { @@ -69,7 +71,7 @@ public class ColumnGenConfig { if (FK.equals(values.get(0)) || (values.get(0).isEmpty() && pkValues != null)) { isFK = true; - values = pkValues; + values = getPkValues(modelGen, config, pkValues); } else if (ID.equals(values.get(0))) { isID = true; idStart = (values.size() > 1) ? Integer.parseInt(values.get(1)) : 0; @@ -90,6 +92,20 @@ public class ColumnGenConfig { unique = Util.parseBoolean(config, "uniq", modelGen.isPK(col)); } + private List<String> getPkValues(ModelDataGenerator modelGen, Map<String, String> config, List<String> dftPkValues) throws IOException { + String pkColName = config.get("pk"); + if (pkColName == null) + return dftPkValues; + + int cut = pkColName.lastIndexOf('.'); + String pkTableName = pkColName.substring(0, cut); + pkColName = pkColName.substring(cut + 1); + + KylinConfig kylinConfig = modelGen.getModle().getConfig(); + ColumnDesc pkcol = MetadataManager.getInstance(kylinConfig).getTableDesc(pkTableName).findColumnByName(pkColName); + return modelGen.getPkValues(pkcol); + } + private int guessCardinality(String col) { for (String s : col.split("_")) { if (s.startsWith("C")) { http://git-wip-us.apache.org/repos/asf/kylin/blob/6f563df4/core-metadata/src/main/java/org/apache/kylin/source/datagen/ModelDataGenerator.java ---------------------------------------------------------------------- diff --git a/core-metadata/src/main/java/org/apache/kylin/source/datagen/ModelDataGenerator.java b/core-metadata/src/main/java/org/apache/kylin/source/datagen/ModelDataGenerator.java index c325ab0..60f2736 100644 --- a/core-metadata/src/main/java/org/apache/kylin/source/datagen/ModelDataGenerator.java +++ b/core-metadata/src/main/java/org/apache/kylin/source/datagen/ModelDataGenerator.java @@ -166,6 +166,9 @@ public class ModelDataGenerator { private void generateCreateTableDDL(Set<TableDesc> tables, PrintWriter out) { for (TableDesc t : tables) { + if (t.isView()) + continue; + out.print("DROP TABLE IF EXISTS " + t.getIdentity() + ";\n"); out.print("CREATE TABLE " + t.getIdentity() + "(" + "\n"); @@ -198,6 +201,11 @@ public class ModelDataGenerator { private void generateLoadDataDDL(Set<TableDesc> tables, PrintWriter out) { for (TableDesc t : tables) { + if (t.isView()) { + out.print("-- " + t.getIdentity() + " is view \n"); + continue; + } + out.print("LOAD DATA LOCAL INPATH '" + t.getIdentity() + ".csv' OVERWRITE INTO TABLE " + t.getIdentity() + ";\n"); } } @@ -241,7 +249,7 @@ public class ModelDataGenerator { return null; } - private List<String> getPkValues(ColumnDesc pk) throws IOException { + public List<String> getPkValues(ColumnDesc pk) throws IOException { if (existsInStore(pk.getTable()) == false) return null; http://git-wip-us.apache.org/repos/asf/kylin/blob/6f563df4/core-metadata/src/main/java/org/apache/kylin/source/datagen/TableGenConfig.java ---------------------------------------------------------------------- diff --git a/core-metadata/src/main/java/org/apache/kylin/source/datagen/TableGenConfig.java b/core-metadata/src/main/java/org/apache/kylin/source/datagen/TableGenConfig.java index be948c1..a0f19e7 100644 --- a/core-metadata/src/main/java/org/apache/kylin/source/datagen/TableGenConfig.java +++ b/core-metadata/src/main/java/org/apache/kylin/source/datagen/TableGenConfig.java @@ -34,7 +34,10 @@ public class TableGenConfig { dataGen = ""; } - if (dataGen == null) + if (dataGen == null || "no".equals(dataGen) || "false".equals(dataGen) || "skip".equals(dataGen)) + return; + + if (table.isView()) return; needGen = true; http://git-wip-us.apache.org/repos/asf/kylin/blob/6f563df4/examples/test_case_data/localmeta/cube/test_kylin_cube_with_view_inner_join_empty.json ---------------------------------------------------------------------- diff --git a/examples/test_case_data/localmeta/cube/test_kylin_cube_with_view_inner_join_empty.json b/examples/test_case_data/localmeta/cube/test_kylin_cube_with_view_inner_join_empty.json deleted file mode 100644 index 6215174..0000000 --- a/examples/test_case_data/localmeta/cube/test_kylin_cube_with_view_inner_join_empty.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "uuid" : "ffff3e80-41be-49a5-90ca-9fb7294db186", - "last_modified" : 0, - "name" : "test_kylin_cube_with_view_inner_join_empty", - "owner" : null, - "descriptor" : "test_kylin_cube_with_view_inner_join_desc", - "segments" : [ ], - "status" : "DISABLED", - "create_time" : null -} http://git-wip-us.apache.org/repos/asf/kylin/blob/6f563df4/examples/test_case_data/localmeta/cube/test_kylin_cube_with_view_left_join_empty.json ---------------------------------------------------------------------- diff --git a/examples/test_case_data/localmeta/cube/test_kylin_cube_with_view_left_join_empty.json b/examples/test_case_data/localmeta/cube/test_kylin_cube_with_view_left_join_empty.json deleted file mode 100644 index 62b7432..0000000 --- a/examples/test_case_data/localmeta/cube/test_kylin_cube_with_view_left_join_empty.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "uuid" : "eeee3e80-41be-49a5-90ca-9fb7294db186", - "last_modified" : 0, - "name" : "test_kylin_cube_with_view_left_join_empty", - "owner" : null, - "descriptor" : "test_kylin_cube_with_view_left_join_desc", - "segments" : [ ], - "status" : "DISABLED", - "create_time" : null -} http://git-wip-us.apache.org/repos/asf/kylin/blob/6f563df4/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_view_inner_join_desc.json ---------------------------------------------------------------------- diff --git a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_view_inner_join_desc.json b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_view_inner_join_desc.json deleted file mode 100644 index d4c64b5..0000000 --- a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_view_inner_join_desc.json +++ /dev/null @@ -1,169 +0,0 @@ -{ - "uuid" : "9876b7a8-3929-4dff-b59d-2100aadc8dbf", - "name" : "test_kylin_cube_with_view_inner_join_desc", - "description" : null, - "dimensions" : [ { - "name" : "CAL_DT", - "table" : "EDW.V_TEST_CAL_DT", - "column" : "{FK}", - "derived" : [ "WEEK_BEG_DT" ] - }, { - "name" : "CATEGORY", - "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS", - "column" : "{FK}", - "derived" : [ "USER_DEFINED_FIELD1", "USER_DEFINED_FIELD3", "UPD_DATE", "UPD_USER" ] - }, { - "name" : "CATEGORY_HIERARCHY", - "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS", - "column" : "META_CATEG_NAME", - "derived" : null - }, { - "name" : "CATEGORY_HIERARCHY", - "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS", - "column" : "CATEG_LVL2_NAME", - "derived" : null - }, { - "name" : "CATEGORY_HIERARCHY", - "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS", - "column" : "CATEG_LVL3_NAME", - "derived" : null - }, { - "name" : "LSTG_FORMAT_NAME", - "table" : "DEFAULT.TEST_KYLIN_FACT", - "column" : "LSTG_FORMAT_NAME", - "derived" : null - }, { - "name" : "SITE_ID", - "table" : "EDW.TEST_SITES", - "column" : "{FK}", - "derived" : [ "SITE_NAME", "CRE_USER" ] - }, { - "name" : "SELLER_TYPE_CD", - "table" : "EDW.TEST_SELLER_TYPE_DIM", - "column" : "{FK}", - "derived" : [ "SELLER_TYPE_DESC" ] - } ], - "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" : "ITEM_COUNT_SUM", - "function" : { - "expression" : "SUM", - "parameter" : { - "type" : "column", - "value" : "ITEM_COUNT", - "next_parameter" : null - }, - "returntype" : "bigint" - }, - "dependent_measure_ref" : null - }], - "rowkey" : { - "rowkey_columns" : [ { - "column" : "cal_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" : "dict" - }, { - "column" : "lstg_site_id", - "encoding" : "dict" - }, { - "column" : "slr_segment_cd", - "encoding" : "dict" - } ] - }, - "signature" : null, - "last_modified" : 1448959801311, - "model_name" : "test_kylin_inner_join_view_model_desc", - "null_string" : null, - "hbase_mapping" : { - "column_family" : [ { - "name" : "f1", - "columns" : [ { - "qualifier" : "m", - "measure_refs" : [ "gmv_sum", "gmv_min", "gmv_max", "trans_cnt", "item_count_sum" ] - } ] - }] - }, - "aggregation_groups" : [ { - "includes" : [ "cal_dt", "categ_lvl2_name", "categ_lvl3_name", "leaf_categ_id", "lstg_format_name", "lstg_site_id", "meta_categ_name"], - "select_rule" : { - "hierarchy_dims" : [ ], - "mandatory_dims" : [ "cal_dt" ], - "joint_dims" : [ [ "categ_lvl2_name", "categ_lvl3_name", "leaf_categ_id", "meta_categ_name" ] ] - } - }, { - "includes" : [ "cal_dt", "categ_lvl2_name", "categ_lvl3_name", "leaf_categ_id", "meta_categ_name" ], - "select_rule" : { - "hierarchy_dims" : [ [ "META_CATEG_NAME", "CATEG_LVL2_NAME", "CATEG_LVL3_NAME" ] ], - "mandatory_dims" : [ "cal_dt" ], - "joint_dims" : [ ] - } - } ], - "notify_list" : null, - "status_need_notify" : [ ], - "auto_merge_time_ranges" : null, - "retention_range" : 0, - "engine_type" : 2, - "storage_type" : 2, - "partition_date_start": 0 -} http://git-wip-us.apache.org/repos/asf/kylin/blob/6f563df4/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_view_left_join_desc.json ---------------------------------------------------------------------- diff --git a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_view_left_join_desc.json b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_view_left_join_desc.json deleted file mode 100644 index 0388c0e..0000000 --- a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_view_left_join_desc.json +++ /dev/null @@ -1,169 +0,0 @@ -{ - "uuid" : "6789b7a8-3929-4dff-b59d-2100aadc8dbf", - "name" : "test_kylin_cube_with_view_left_join_desc", - "description" : null, - "dimensions" : [ { - "name" : "CAL_DT", - "table" : "EDW.V_TEST_CAL_DT", - "column" : "{FK}", - "derived" : [ "WEEK_BEG_DT" ] - }, { - "name" : "CATEGORY", - "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS", - "column" : "{FK}", - "derived" : [ "USER_DEFINED_FIELD1", "USER_DEFINED_FIELD3", "UPD_DATE", "UPD_USER" ] - }, { - "name" : "CATEGORY_HIERARCHY", - "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS", - "column" : "META_CATEG_NAME", - "derived" : null - }, { - "name" : "CATEGORY_HIERARCHY", - "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS", - "column" : "CATEG_LVL2_NAME", - "derived" : null - }, { - "name" : "CATEGORY_HIERARCHY", - "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS", - "column" : "CATEG_LVL3_NAME", - "derived" : null - }, { - "name" : "LSTG_FORMAT_NAME", - "table" : "DEFAULT.TEST_KYLIN_FACT", - "column" : "LSTG_FORMAT_NAME", - "derived" : null - }, { - "name" : "SITE_ID", - "table" : "EDW.TEST_SITES", - "column" : "{FK}", - "derived" : [ "SITE_NAME", "CRE_USER" ] - }, { - "name" : "SELLER_TYPE_CD", - "table" : "EDW.TEST_SELLER_TYPE_DIM", - "column" : "{FK}", - "derived" : [ "SELLER_TYPE_DESC" ] - } ], - "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" : "ITEM_COUNT_SUM", - "function" : { - "expression" : "SUM", - "parameter" : { - "type" : "column", - "value" : "ITEM_COUNT", - "next_parameter" : null - }, - "returntype" : "bigint" - }, - "dependent_measure_ref" : null - }], - "rowkey" : { - "rowkey_columns" : [ { - "column" : "cal_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" : "dict" - }, { - "column" : "lstg_site_id", - "encoding" : "dict" - }, { - "column" : "slr_segment_cd", - "encoding" : "dict" - } ] - }, - "signature" : null, - "last_modified" : 1448959801311, - "model_name" : "test_kylin_left_join_view_model_desc", - "null_string" : null, - "hbase_mapping" : { - "column_family" : [ { - "name" : "f1", - "columns" : [ { - "qualifier" : "m", - "measure_refs" : [ "gmv_sum", "gmv_min", "gmv_max", "trans_cnt", "item_count_sum" ] - } ] - }] - }, - "aggregation_groups" : [ { - "includes" : [ "cal_dt", "categ_lvl2_name", "categ_lvl3_name", "leaf_categ_id", "lstg_format_name", "lstg_site_id", "meta_categ_name"], - "select_rule" : { - "hierarchy_dims" : [ ], - "mandatory_dims" : [ "cal_dt" ], - "joint_dims" : [ [ "categ_lvl2_name", "categ_lvl3_name", "leaf_categ_id", "meta_categ_name" ] ] - } - }, { - "includes" : [ "cal_dt", "categ_lvl2_name", "categ_lvl3_name", "leaf_categ_id", "meta_categ_name" ], - "select_rule" : { - "hierarchy_dims" : [ [ "META_CATEG_NAME", "CATEG_LVL2_NAME", "CATEG_LVL3_NAME" ] ], - "mandatory_dims" : [ "cal_dt" ], - "joint_dims" : [ ] - } - } ], - "notify_list" : null, - "status_need_notify" : [ ], - "auto_merge_time_ranges" : null, - "retention_range" : 0, - "engine_type" : 2, - "storage_type" : 2, - "partition_date_start": 0 -} http://git-wip-us.apache.org/repos/asf/kylin/blob/6f563df4/examples/test_case_data/localmeta/data/EDW.TEST_SELLER_TYPE_DIM.csv ---------------------------------------------------------------------- diff --git a/examples/test_case_data/localmeta/data/EDW.TEST_SELLER_TYPE_DIM.csv b/examples/test_case_data/localmeta/data/EDW.TEST_SELLER_TYPE_DIM.csv deleted file mode 100644 index 73abe26..0000000 --- a/examples/test_case_data/localmeta/data/EDW.TEST_SELLER_TYPE_DIM.csv +++ /dev/null @@ -1,8 +0,0 @@ -16,Consumer-Other,16,102,Consumer,2012-08-09,USER_P,,USER_A -5,Occasional,5,102,Consumer,2010-05-11,USER_H,2011-03-01 11:30:52,USER_A -15,Professional-Other,15,101,Professional,2012-08-09,USER_P,,USER_A --99,Not Applicable,-99,-99,Not Applicable,2010-05-11,USER_H,,USER_A -14,Regular,14,102,Consumer,2011-03-01,USER_H,,USER_A -12,Merchant,12,101,Professional,2011-03-01,USER_H,,USER_A -11,Large Merchant,11,101,Professional,2011-03-01,USER_H,,USER_A -13,Entrepreneur,13,101,Professional,2011-03-01,USER_H,,USER_A http://git-wip-us.apache.org/repos/asf/kylin/blob/6f563df4/examples/test_case_data/localmeta/data/EDW.TEST_SELLER_TYPE_DIM_TABLE.csv ---------------------------------------------------------------------- diff --git a/examples/test_case_data/localmeta/data/EDW.TEST_SELLER_TYPE_DIM_TABLE.csv b/examples/test_case_data/localmeta/data/EDW.TEST_SELLER_TYPE_DIM_TABLE.csv new file mode 100644 index 0000000..d653ae2 --- /dev/null +++ b/examples/test_case_data/localmeta/data/EDW.TEST_SELLER_TYPE_DIM_TABLE.csv @@ -0,0 +1,8 @@ +16,Consumer-Other,16,102,Consumer,2012-08-09,USER_P,,USER_A +5,Occasional,5,102,Consumer,2010-05-11,USER_H,2011-03-01 11:30:52,USER_A +15,Professional-Other,15,101,Professional,2012-08-09,USER_P,,USER_A +-99,Not Applicable,-99,-99,Not Applicable,2010-05-11,USER_H,,USER_A +14,Regular,14,102,Consumer,2011-03-01,USER_H,,USER_A +12,Merchant,12,101,Professional,2011-03-01,USER_H,,USER_A +11,Large Merchant,11,101,Professional,2011-03-01,USER_H,,USER_A +13,Entrepreneur,13,101,Professional,2011-03-01,USER_H,,USER_A http://git-wip-us.apache.org/repos/asf/kylin/blob/6f563df4/examples/test_case_data/localmeta/model_desc/test_kylin_inner_join_view_model_desc.json ---------------------------------------------------------------------- diff --git a/examples/test_case_data/localmeta/model_desc/test_kylin_inner_join_view_model_desc.json b/examples/test_case_data/localmeta/model_desc/test_kylin_inner_join_view_model_desc.json deleted file mode 100644 index d7b7227..0000000 --- a/examples/test_case_data/localmeta/model_desc/test_kylin_inner_join_view_model_desc.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "uuid": "8b184ee2-1ccb-4b07-a38e-4c298563e0f7", - "name": "test_kylin_inner_join_view_model_desc", - "lookups": [ - { - "table": "EDW.V_TEST_CAL_DT", - "join": { - "type": "inner", - "primary_key": [ - "CAL_DT" - ], - "foreign_key": [ - "CAL_DT" - ] - } - }, - { - "table": "DEFAULT.TEST_CATEGORY_GROUPINGS", - "join": { - "type": "inner", - "primary_key": [ - "LEAF_CATEG_ID", - "SITE_ID" - ], - "foreign_key": [ - "LEAF_CATEG_ID", - "LSTG_SITE_ID" - ] - } - }, - { - "table": "EDW.TEST_SITES", - "join": { - "type": "inner", - "primary_key": [ - "SITE_ID" - ], - "foreign_key": [ - "LSTG_SITE_ID" - ] - } - }, - { - "table": "EDW.TEST_SELLER_TYPE_DIM", - "join": { - "type": "inner", - "primary_key": [ - "SELLER_TYPE_CD" - ], - "foreign_key": [ - "SLR_SEGMENT_CD" - ] - } - } - ], - "dimensions": [ - { - "table": "default.test_kylin_fact", - "columns": [ - "TRANS_ID", - "CAL_DT", - "lstg_format_name", - "LSTG_SITE_ID", - "SLR_SEGMENT_CD", - "SELLER_ID" - ] - }, - { - "table": "default.test_category_groupings", - "columns": [ - "leaf_categ_id", - "site_id", - "USER_DEFINED_FIELD1", - "USER_DEFINED_FIELD3", - "UPD_DATE", - "UPD_USER", - "meta_categ_name", - "categ_lvl2_name", - "categ_lvl3_name" - ] - }, - { - "table": "edw.test_sites", - "columns": [ - "site_id", - "site_name", - "cre_user" - ] - }, - { - "table": "edw.test_seller_type_dim", - "columns": [ - "seller_type_cd", - "seller_type_desc" - ] - }, - { - "table": "edw.v_test_cal_dt", - "columns": [ - "cal_dt", - "week_beg_dt" - ] - } - ], - "metrics": [ - "PRICE", - "ITEM_COUNT", - "SELLER_ID", - "USER_ID" - ], - "last_modified": 1422435345352, - "fact_table": "DEFAULT.TEST_KYLIN_FACT", - "filter_condition": null, - "partition_desc": { - "partition_date_column": "DEFAULT.TEST_KYLIN_FACT.cal_dt", - "partition_date_start": 0, - "partition_type": "APPEND" - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/kylin/blob/6f563df4/examples/test_case_data/localmeta/model_desc/test_kylin_left_join_view_model_desc.json ---------------------------------------------------------------------- diff --git a/examples/test_case_data/localmeta/model_desc/test_kylin_left_join_view_model_desc.json b/examples/test_case_data/localmeta/model_desc/test_kylin_left_join_view_model_desc.json deleted file mode 100644 index 2ff55d3..0000000 --- a/examples/test_case_data/localmeta/model_desc/test_kylin_left_join_view_model_desc.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "uuid": "9c184ee2-1ccb-4b07-a38e-4c298563e0f7", - "name": "test_kylin_left_join_view_model_desc", - "lookups": [ - { - "table": "EDW.V_TEST_CAL_DT", - "join": { - "type": "left", - "primary_key": [ - "CAL_DT" - ], - "foreign_key": [ - "CAL_DT" - ] - } - }, - { - "table": "DEFAULT.TEST_CATEGORY_GROUPINGS", - "join": { - "type": "left", - "primary_key": [ - "LEAF_CATEG_ID", - "SITE_ID" - ], - "foreign_key": [ - "LEAF_CATEG_ID", - "LSTG_SITE_ID" - ] - } - }, - { - "table": "EDW.TEST_SITES", - "join": { - "type": "left", - "primary_key": [ - "SITE_ID" - ], - "foreign_key": [ - "LSTG_SITE_ID" - ] - } - }, - { - "table": "EDW.TEST_SELLER_TYPE_DIM", - "join": { - "type": "left", - "primary_key": [ - "SELLER_TYPE_CD" - ], - "foreign_key": [ - "SLR_SEGMENT_CD" - ] - } - } - ], - "dimensions": [ - { - "table": "default.test_kylin_fact", - "columns": [ - "TRANS_ID", - "CAL_DT", - "lstg_format_name", - "LSTG_SITE_ID", - "SLR_SEGMENT_CD", - "SELLER_ID" - ] - }, - { - "table": "default.test_category_groupings", - "columns": [ - "leaf_categ_id", - "site_id", - "USER_DEFINED_FIELD1", - "USER_DEFINED_FIELD3", - "UPD_DATE", - "UPD_USER", - "meta_categ_name", - "categ_lvl2_name", - "categ_lvl3_name" - ] - }, - { - "table": "edw.test_sites", - "columns": [ - "site_id", - "site_name", - "cre_user" - ] - }, - { - "table": "edw.test_seller_type_dim", - "columns": [ - "seller_type_cd", - "seller_type_desc" - ] - }, - { - "table": "edw.v_test_cal_dt", - "columns": [ - "cal_dt", - "week_beg_dt" - ] - } - ], - "metrics": [ - "PRICE", - "ITEM_COUNT", - "SELLER_ID", - "USER_ID" - ], - "last_modified": 1422435345352, - "fact_table": "DEFAULT.TEST_KYLIN_FACT", - "filter_condition": null, - "partition_desc": { - "partition_date_column": "DEFAULT.TEST_KYLIN_FACT.cal_dt", - "partition_date_start": 0, - "partition_type": "APPEND" - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/kylin/blob/6f563df4/examples/test_case_data/localmeta/project/default.json ---------------------------------------------------------------------- diff --git a/examples/test_case_data/localmeta/project/default.json b/examples/test_case_data/localmeta/project/default.json index d24a22a..5eefce7 100644 --- a/examples/test_case_data/localmeta/project/default.json +++ b/examples/test_case_data/localmeta/project/default.json @@ -32,16 +32,6 @@ "type": "HYBRID", "realization": "test_kylin_hybrid_inner_join" }, - { - "name": "test_kylin_cube_with_view_left_join_empty", - "type": "CUBE", - "realization": "test_kylin_cube_with_view_left_join_empty" - }, - { - "name": "test_kylin_cube_with_view_inner_join_empty", - "type": "CUBE", - "realization": "test_kylin_cube_with_view_inner_join_empty" - }, { "name": "ssb", "type": "CUBE", @@ -51,18 +41,16 @@ "tables": [ "DEFAULT.TEST_KYLIN_FACT", "EDW.TEST_CAL_DT", - "EDW.V_TEST_CAL_DT", "DEFAULT.TEST_CATEGORY_GROUPINGS", "EDW.TEST_SITES", "EDW.TEST_SELLER_TYPE_DIM", + "EDW.TEST_SELLER_TYPE_DIM_TABLE", "DEFAULT.STREAMING_TABLE" ], "models": [ "ssb", "test_kylin_inner_join_model_desc", - "test_kylin_inner_join_view_model_desc", "test_kylin_left_join_model_desc", - "test_kylin_left_join_view_model_desc", "test_streaming_table_model_desc" ], "override_kylin_properties" :{ http://git-wip-us.apache.org/repos/asf/kylin/blob/6f563df4/examples/test_case_data/localmeta/table/DEFAULT.TEST_CATEGORY_GROUPINGS.json ---------------------------------------------------------------------- diff --git a/examples/test_case_data/localmeta/table/DEFAULT.TEST_CATEGORY_GROUPINGS.json b/examples/test_case_data/localmeta/table/DEFAULT.TEST_CATEGORY_GROUPINGS.json index 069f41b..d7ab580 100644 --- a/examples/test_case_data/localmeta/table/DEFAULT.TEST_CATEGORY_GROUPINGS.json +++ b/examples/test_case_data/localmeta/table/DEFAULT.TEST_CATEGORY_GROUPINGS.json @@ -1,152 +1,152 @@ -{ - - "uuid" : "952d11b5-69d9-45d1-92af-227489485e3f", - "name" : "TEST_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" : "GROUPINGS_CRE_DATE", - "datatype" : "string" - }, { - "id" : "10", - "name" : "UPD_DATE", - "datatype" : "string" - }, { - "id" : "11", - "name" : "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 +{ + + "uuid" : "952d11b5-69d9-45d1-92af-227489485e3f", + "name" : "TEST_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" : "GROUPINGS_CRE_DATE", + "datatype" : "string" + }, { + "id" : "10", + "name" : "UPD_DATE", + "datatype" : "string" + }, { + "id" : "11", + "name" : "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/6f563df4/examples/test_case_data/localmeta/table/DEFAULT.TEST_KYLIN_COUNTRY.json ---------------------------------------------------------------------- diff --git a/examples/test_case_data/localmeta/table/DEFAULT.TEST_KYLIN_COUNTRY.json b/examples/test_case_data/localmeta/table/DEFAULT.TEST_KYLIN_COUNTRY.json index 95b34c2..acf5470 100644 --- a/examples/test_case_data/localmeta/table/DEFAULT.TEST_KYLIN_COUNTRY.json +++ b/examples/test_case_data/localmeta/table/DEFAULT.TEST_KYLIN_COUNTRY.json @@ -1,24 +1,24 @@ -{ - "uuid" : "e286e39e-40d7-44c2-8fa2-41b365632882", - - "name" : "TEST_KYLIN_COUNTRY", - "columns" : [ { - "id" : "1", - "name" : "COUNTRY", - "datatype" : "string" - }, { - "id" : "2", - "name" : "LATITUDE", - "datatype" : "double" - }, { - "id" : "3", - "name" : "LONGITUDE", - "datatype" : "double" - }, { - "id" : "4", - "name" : "NAME", - "datatype" : "string" - } ], - "database" : "DEFAULT", - "last_modified" : 0 +{ + "uuid" : "e286e39e-40d7-44c2-8fa2-41b365632882", + + "name" : "TEST_KYLIN_COUNTRY", + "columns" : [ { + "id" : "1", + "name" : "COUNTRY", + "datatype" : "string" + }, { + "id" : "2", + "name" : "LATITUDE", + "datatype" : "double" + }, { + "id" : "3", + "name" : "LONGITUDE", + "datatype" : "double" + }, { + "id" : "4", + "name" : "NAME", + "datatype" : "string" + } ], + "database" : "DEFAULT", + "last_modified" : 0 } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/kylin/blob/6f563df4/examples/test_case_data/localmeta/table/DEFAULT.TEST_KYLIN_FACT.json ---------------------------------------------------------------------- diff --git a/examples/test_case_data/localmeta/table/DEFAULT.TEST_KYLIN_FACT.json b/examples/test_case_data/localmeta/table/DEFAULT.TEST_KYLIN_FACT.json index ea9c701..5fb3edf 100644 --- a/examples/test_case_data/localmeta/table/DEFAULT.TEST_KYLIN_FACT.json +++ b/examples/test_case_data/localmeta/table/DEFAULT.TEST_KYLIN_FACT.json @@ -1,66 +1,67 @@ -{ - "uuid" : "e286e39e-40d7-44c2-8fa2-41b365522771", - "name" : "TEST_KYLIN_FACT", - "data_gen" : "1", - "columns" : [ { - "id" : "1", - "name" : "TRANS_ID", - "datatype" : "bigint", - "data_gen" : "ID" - }, { - "id" : "2", - "name" : "CAL_DT", - "datatype" : "date", - "data_gen" : "FK,order" - }, { - "id" : "3", - "name" : "LSTG_FORMAT_NAME", - "datatype" : "string", - "data_gen" : "FP-GTC|FP-non GTC|ABIN|Auction|Others" - }, { - "id" : "4", - "name" : "LEAF_CATEG_ID", - "datatype" : "bigint", - "data_gen" : "FK,null,nullstr=0" - }, { - "id" : "5", - "name" : "LSTG_SITE_ID", - "datatype" : "int" - }, { - "id" : "6", - "name" : "SLR_SEGMENT_CD", - "datatype" : "smallint" - }, { - "id" : "7", - "name" : "PRICE", - "datatype" : "decimal", - "data_gen" : "RAND|.##|-100|1000" - }, { - "id" : "8", - "name" : "ITEM_COUNT", - "datatype" : "int", - "data_gen" : "RAND" - }, { - "id" : "9", - "name" : "SELLER_ID", - "datatype" : "bigint", - "data_gen" : "RAND||10000000|10001000" - }, { - "id" : "10", - "name" : "USER_ID", - "datatype" : "varchar(32)", - "data_gen" : "RAND,order" - }, { - "id" : "11", - "name" : "BUYER_COUNTRY", - "datatype" : "string", - "data_gen" : "CN|DE|FR|JP|UK|US" - }, { - "id" : "12", - "name" : "SELLER_COUNTRY", - "datatype" : "string", - "data_gen" : "CN|DE|FR|JP|UK|US" - } ], - "database" : "DEFAULT", - "last_modified" : 0 -} +{ + "uuid" : "e286e39e-40d7-44c2-8fa2-41b365522771", + "name" : "TEST_KYLIN_FACT", + "data_gen" : "1", + "columns" : [ { + "id" : "1", + "name" : "TRANS_ID", + "datatype" : "bigint", + "data_gen" : "ID" + }, { + "id" : "2", + "name" : "CAL_DT", + "datatype" : "date", + "data_gen" : "FK,order" + }, { + "id" : "3", + "name" : "LSTG_FORMAT_NAME", + "datatype" : "string", + "data_gen" : "FP-GTC|FP-non GTC|ABIN|Auction|Others" + }, { + "id" : "4", + "name" : "LEAF_CATEG_ID", + "datatype" : "bigint", + "data_gen" : "FK,null,nullstr=0" + }, { + "id" : "5", + "name" : "LSTG_SITE_ID", + "datatype" : "int" + }, { + "id" : "6", + "name" : "SLR_SEGMENT_CD", + "datatype" : "smallint", + "data_gen" : "FK,pk=EDW.TEST_SELLER_TYPE_DIM_TABLE.SELLER_TYPE_CD" + }, { + "id" : "7", + "name" : "PRICE", + "datatype" : "decimal", + "data_gen" : "RAND|.##|-100|1000" + }, { + "id" : "8", + "name" : "ITEM_COUNT", + "datatype" : "int", + "data_gen" : "RAND" + }, { + "id" : "9", + "name" : "SELLER_ID", + "datatype" : "bigint", + "data_gen" : "RAND||10000000|10001000" + }, { + "id" : "10", + "name" : "USER_ID", + "datatype" : "varchar(32)", + "data_gen" : "RAND,order" + }, { + "id" : "11", + "name" : "BUYER_COUNTRY", + "datatype" : "string", + "data_gen" : "CN|DE|FR|JP|UK|US" + }, { + "id" : "12", + "name" : "SELLER_COUNTRY", + "datatype" : "string", + "data_gen" : "CN|DE|FR|JP|UK|US" + } ], + "database" : "DEFAULT", + "last_modified" : 0 +} http://git-wip-us.apache.org/repos/asf/kylin/blob/6f563df4/examples/test_case_data/localmeta/table/EDW.TEST_CAL_DT.json ---------------------------------------------------------------------- diff --git a/examples/test_case_data/localmeta/table/EDW.TEST_CAL_DT.json b/examples/test_case_data/localmeta/table/EDW.TEST_CAL_DT.json index dde24cf..02299d9 100644 --- a/examples/test_case_data/localmeta/table/EDW.TEST_CAL_DT.json +++ b/examples/test_case_data/localmeta/table/EDW.TEST_CAL_DT.json @@ -1,408 +1,408 @@ -{ - - "uuid" : "0ff420eb-79ad-40bd-bca9-12d8cd05c60a", - "name" : "TEST_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" : "CAL_DT_CRE_DATE", - "datatype" : "string" - }, { - "id" : "98", - "name" : "CAL_DT_CRE_USER", - "datatype" : "string" - }, { - "id" : "99", - "name" : "CAL_DT_UPD_DATE", - "datatype" : "string" - }, { - "id" : "100", - "name" : "CAL_DT_UPD_USER", - "datatype" : "string" - } ], - "database" : "edw", - "last_modified" : 0 +{ + + "uuid" : "0ff420eb-79ad-40bd-bca9-12d8cd05c60a", + "name" : "TEST_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" : "CAL_DT_CRE_DATE", + "datatype" : "string" + }, { + "id" : "98", + "name" : "CAL_DT_CRE_USER", + "datatype" : "string" + }, { + "id" : "99", + "name" : "CAL_DT_UPD_DATE", + "datatype" : "string" + }, { + "id" : "100", + "name" : "CAL_DT_UPD_USER", + "datatype" : "string" + } ], + "database" : "edw", + "last_modified" : 0 } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/kylin/blob/6f563df4/examples/test_case_data/localmeta/table/EDW.TEST_SELLER_TYPE_DIM.json ---------------------------------------------------------------------- diff --git a/examples/test_case_data/localmeta/table/EDW.TEST_SELLER_TYPE_DIM.json b/examples/test_case_data/localmeta/table/EDW.TEST_SELLER_TYPE_DIM.json index eec48ea..2bfbb70 100644 --- a/examples/test_case_data/localmeta/table/EDW.TEST_SELLER_TYPE_DIM.json +++ b/examples/test_case_data/localmeta/table/EDW.TEST_SELLER_TYPE_DIM.json @@ -1,44 +1,44 @@ -{ - - "uuid" : "9ecc90c4-55df-436f-8602-2fbd4bca72e1", - "name" : "TEST_SELLER_TYPE_DIM", - "columns" : [ { - "id" : "1", - "name" : "SELLER_TYPE_CD", - "datatype" : "smallint" - }, { - "id" : "2", - "name" : "SELLER_TYPE_DESC", - "datatype" : "string" - }, { - "id" : "3", - "name" : "GLBL_RPRT_SLR_SGMNT_CD", - "datatype" : "tinyint" - }, { - "id" : "4", - "name" : "SELLER_GROUP_CD", - "datatype" : "tinyint" - }, { - "id" : "5", - "name" : "SELLER_GROUP_DESC", - "datatype" : "string" - }, { - "id" : "6", - "name" : "DIM_CRE_DATE", - "datatype" : "string" - }, { - "id" : "7", - "name" : "DIM_CRE_USER", - "datatype" : "string" - }, { - "id" : "8", - "name" : "DIM_UPD_DATE", - "datatype" : "string" - }, { - "id" : "9", - "name" : "DIM_UPD_USER", - "datatype" : "string" - } ], - "database" : "edw", - "last_modified" : 0 +{ + "uuid" : "9ecc90c4-55df-436f-8602-2fbd4bca72e1", + "name" : "TEST_SELLER_TYPE_DIM", + "columns" : [ { + "id" : "1", + "name" : "SELLER_TYPE_CD", + "datatype" : "smallint" + }, { + "id" : "2", + "name" : "SELLER_TYPE_DESC", + "datatype" : "string" + }, { + "id" : "3", + "name" : "GLBL_RPRT_SLR_SGMNT_CD", + "datatype" : "tinyint" + }, { + "id" : "4", + "name" : "SELLER_GROUP_CD", + "datatype" : "tinyint" + }, { + "id" : "5", + "name" : "SELLER_GROUP_DESC", + "datatype" : "string" + }, { + "id" : "6", + "name" : "DIM_CRE_DATE", + "datatype" : "string" + }, { + "id" : "7", + "name" : "DIM_CRE_USER", + "datatype" : "string" + }, { + "id" : "8", + "name" : "DIM_UPD_DATE", + "datatype" : "string" + }, { + "id" : "9", + "name" : "DIM_UPD_USER", + "datatype" : "string" + } ], + "database" : "edw", + "table_type" : "VIRTUAL_VIEW", + "last_modified" : 0 } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/kylin/blob/6f563df4/examples/test_case_data/localmeta/table/EDW.TEST_SELLER_TYPE_DIM_TABLE.json ---------------------------------------------------------------------- diff --git a/examples/test_case_data/localmeta/table/EDW.TEST_SELLER_TYPE_DIM_TABLE.json b/examples/test_case_data/localmeta/table/EDW.TEST_SELLER_TYPE_DIM_TABLE.json new file mode 100644 index 0000000..3c5749b --- /dev/null +++ b/examples/test_case_data/localmeta/table/EDW.TEST_SELLER_TYPE_DIM_TABLE.json @@ -0,0 +1,43 @@ +{ + "uuid" : "addc20c4-55df-436f-8602-2fbd4bca2910", + "name" : "TEST_SELLER_TYPE_DIM_TABLE", + "columns" : [ { + "id" : "1", + "name" : "SELLER_TYPE_CD", + "datatype" : "smallint" + }, { + "id" : "2", + "name" : "SELLER_TYPE_DESC", + "datatype" : "string" + }, { + "id" : "3", + "name" : "GLBL_RPRT_SLR_SGMNT_CD", + "datatype" : "tinyint" + }, { + "id" : "4", + "name" : "SELLER_GROUP_CD", + "datatype" : "tinyint" + }, { + "id" : "5", + "name" : "SELLER_GROUP_DESC", + "datatype" : "string" + }, { + "id" : "6", + "name" : "DIM_CRE_DATE", + "datatype" : "string" + }, { + "id" : "7", + "name" : "DIM_CRE_USER", + "datatype" : "string" + }, { + "id" : "8", + "name" : "DIM_UPD_DATE", + "datatype" : "string" + }, { + "id" : "9", + "name" : "DIM_UPD_USER", + "datatype" : "string" + } ], + "database" : "edw", + "last_modified" : 0 +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/kylin/blob/6f563df4/examples/test_case_data/localmeta/table/EDW.TEST_SITES.json ---------------------------------------------------------------------- diff --git a/examples/test_case_data/localmeta/table/EDW.TEST_SITES.json b/examples/test_case_data/localmeta/table/EDW.TEST_SITES.json index 06a0b2e..cc801af 100644 --- a/examples/test_case_data/localmeta/table/EDW.TEST_SITES.json +++ b/examples/test_case_data/localmeta/table/EDW.TEST_SITES.json @@ -1,48 +1,48 @@ -{ - - "uuid" : "338a3325-a947-46d1-9ece-e079b3b8d4a6", - "name" : "TEST_SITES", - "columns" : [ { - "id" : "1", - "name" : "SITE_ID", - "datatype" : "int" - }, { - "id" : "2", - "name" : "SITE_NAME", - "datatype" : "string" - }, { - "id" : "3", - "name" : "SITE_DOMAIN_CODE", - "datatype" : "string" - }, { - "id" : "4", - "name" : "DFAULT_LSTG_CURNCY", - "datatype" : "int" - }, { - "id" : "5", - "name" : "EOA_EMAIL_CSTMZBL_SITE_YN_ID", - "datatype" : "tinyint" - }, { - "id" : "6", - "name" : "SITE_CNTRY_ID", - "datatype" : "int" - }, { - "id" : "7", - "name" : "CRE_DATE", - "datatype" : "string" - }, { - "id" : "8", - "name" : "SITES_UPD_DATE", - "datatype" : "string" - }, { - "id" : "9", - "name" : "CRE_USER", - "datatype" : "string" - }, { - "id" : "10", - "name" : "SITES_UPD_USER", - "datatype" : "string" - } ], - "database" : "edw", - "last_modified" : 0 +{ + + "uuid" : "338a3325-a947-46d1-9ece-e079b3b8d4a6", + "name" : "TEST_SITES", + "columns" : [ { + "id" : "1", + "name" : "SITE_ID", + "datatype" : "int" + }, { + "id" : "2", + "name" : "SITE_NAME", + "datatype" : "string" + }, { + "id" : "3", + "name" : "SITE_DOMAIN_CODE", + "datatype" : "string" + }, { + "id" : "4", + "name" : "DFAULT_LSTG_CURNCY", + "datatype" : "int" + }, { + "id" : "5", + "name" : "EOA_EMAIL_CSTMZBL_SITE_YN_ID", + "datatype" : "tinyint" + }, { + "id" : "6", + "name" : "SITE_CNTRY_ID", + "datatype" : "int" + }, { + "id" : "7", + "name" : "CRE_DATE", + "datatype" : "string" + }, { + "id" : "8", + "name" : "SITES_UPD_DATE", + "datatype" : "string" + }, { + "id" : "9", + "name" : "CRE_USER", + "datatype" : "string" + }, { + "id" : "10", + "name" : "SITES_UPD_USER", + "datatype" : "string" + } ], + "database" : "edw", + "last_modified" : 0 } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/kylin/blob/6f563df4/examples/test_case_data/localmeta/table/EDW.V_TEST_CAL_DT.json ---------------------------------------------------------------------- diff --git a/examples/test_case_data/localmeta/table/EDW.V_TEST_CAL_DT.json b/examples/test_case_data/localmeta/table/EDW.V_TEST_CAL_DT.json deleted file mode 100644 index 9298c7f..0000000 --- a/examples/test_case_data/localmeta/table/EDW.V_TEST_CAL_DT.json +++ /dev/null @@ -1,409 +0,0 @@ -{ - - "uuid" : "0ff420eb-79ad-40bd-bca9-12d8cd05c60a", - "name" : "V_TEST_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" : "V_CAL_DT_CRE_DATE", - "datatype" : "string" - }, { - "id" : "98", - "name" : "V_CAL_DT_CRE_USER", - "datatype" : "string" - }, { - "id" : "99", - "name" : "V_CAL_DT_UPD_DATE", - "datatype" : "string" - }, { - "id" : "100", - "name" : "V_CAL_DT_UPD_USER", - "datatype" : "string" - } ], - "database" : "edw", - "table_type" : "VIRTUAL_VIEW", - "last_modified" : 0 -} \ No newline at end of file