You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by ka...@apache.org on 2017/05/24 10:43:02 UTC
[31/50] [abbrv] kylin git commit: minor,
materialize lookup views as external table
minor, materialize lookup views as external table
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/4766c789
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/4766c789
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/4766c789
Branch: refs/heads/KYLIN-2606
Commit: 4766c789d8298b477edad7a9e86ebaec603f1b52
Parents: 8cd807f
Author: Cheng Wang <ch...@kyligence.io>
Authored: Tue May 23 11:10:41 2017 +0800
Committer: 成 <ch...@kyligence.io>
Committed: Tue May 23 11:30:25 2017 +0800
----------------------------------------------------------------------
.../src/main/java/org/apache/kylin/source/hive/HiveMRInput.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/4766c789/source-hive/src/main/java/org/apache/kylin/source/hive/HiveMRInput.java
----------------------------------------------------------------------
diff --git a/source-hive/src/main/java/org/apache/kylin/source/hive/HiveMRInput.java b/source-hive/src/main/java/org/apache/kylin/source/hive/HiveMRInput.java
index bdbe321..dffba8a 100644
--- a/source-hive/src/main/java/org/apache/kylin/source/hive/HiveMRInput.java
+++ b/source-hive/src/main/java/org/apache/kylin/source/hive/HiveMRInput.java
@@ -193,7 +193,7 @@ public class HiveMRInput implements IMRInput {
if (lookUpTableDesc.isView()) {
StringBuilder createIntermediateTableHql = new StringBuilder();
createIntermediateTableHql.append("DROP TABLE IF EXISTS " + lookUpTableDesc.getMaterializedName() + ";\n");
- createIntermediateTableHql.append("CREATE TABLE IF NOT EXISTS " + lookUpTableDesc.getMaterializedName() + "\n");
+ createIntermediateTableHql.append("CREATE EXTERNAL TABLE IF NOT EXISTS " + lookUpTableDesc.getMaterializedName() + "\n");
createIntermediateTableHql.append("LOCATION '" + jobWorkingDir + "/" + lookUpTableDesc.getMaterializedName() + "'\n");
createIntermediateTableHql.append("AS SELECT * FROM " + lookUpTableDesc.getIdentity() + ";\n");
hiveCmdBuilder.addStatement(createIntermediateTableHql.toString());