You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2017/12/03 06:40:30 UTC

[2/2] kylin git commit: KYLIN-3077 create table EDW.TEST_SELLER_TYPE_DIM_TABLE during CI prepare data

KYLIN-3077 create table EDW.TEST_SELLER_TYPE_DIM_TABLE during CI prepare data


Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/43d02f47
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/43d02f47
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/43d02f47

Branch: refs/heads/tmp
Commit: 43d02f4730f17bde981582d5a94591ca9f2c1f22
Parents: f5e2280
Author: Li Yang <li...@apache.org>
Authored: Sun Dec 3 14:40:14 2017 +0800
Committer: Li Yang <li...@apache.org>
Committed: Sun Dec 3 14:40:14 2017 +0800

----------------------------------------------------------------------
 assembly/src/test/java/org/apache/kylin/job/DeployUtil.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/43d02f47/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 5866c09..8f6c7dc 100644
--- a/assembly/src/test/java/org/apache/kylin/job/DeployUtil.java
+++ b/assembly/src/test/java/org/apache/kylin/job/DeployUtil.java
@@ -190,6 +190,9 @@ public class DeployUtil {
     }
 
     private static void deployTables(String modelName) throws Exception {
+        // the special VIEW_SELLER_TYPE_DIM is a wrapper of TABLE_SELLER_TYPE_DIM_TABLE
+        final String VIEW_SELLER_TYPE_DIM = "EDW.TEST_SELLER_TYPE_DIM";
+        final String TABLE_SELLER_TYPE_DIM_TABLE = "EDW.TEST_SELLER_TYPE_DIM_TABLE";
 
         TableMetadataManager metaMgr = TableMetadataManager.getInstance(config());
         DataModelManager modelMgr = DataModelManager.getInstance(config());
@@ -205,6 +208,8 @@ public class DeployUtil {
                 TABLE_NAMES.add(identity);
             }
         }
+        TABLE_NAMES.add(TABLE_SELLER_TYPE_DIM_TABLE); // the wrapper view VIEW_SELLER_TYPE_DIM need this table
+        
         // scp data files, use the data from hbase, instead of local files
         File tempDir = Files.createTempDir();
         String tempDirAbsPath = tempDir.getAbsolutePath();
@@ -239,12 +244,11 @@ public class DeployUtil {
         // load data to hive tables
         // LOAD DATA LOCAL INPATH 'filepath' [OVERWRITE] INTO TABLE tablename
         for (String tablename : TABLE_NAMES) {
+            logger.info(String.format("load data into %s", tablename));
             sampleDataDeployer.loadSampleData(tablename, tempDirAbsPath);
         }
         
         //TODO create the view automatically here
-        final String VIEW_SELLER_TYPE_DIM = "edw.test_seller_type_dim";
-        final String TABLE_SELLER_TYPE_DIM_TABLE = "edw.test_seller_type_dim_table";
         sampleDataDeployer.createWrapperView(TABLE_SELLER_TYPE_DIM_TABLE, VIEW_SELLER_TYPE_DIM);
     }
 }