[17/50] [abbrv] kylin git commit: KYLIN-2068: add optional comment column when sync hive table columns
KYLIN-2068: add optional comment column when sync hive table columns Signed-off-by: shaofengshiProject: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/58afe010 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/58afe010 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/58afe010 Branch: refs/heads/master-cdh5.7 Commit: 58afe0103098dd0845cb50a0751e3305a973f834 Parents: 460536c Author: Yiming Liu Authored: Mon Oct 10 23:49:19 2016 +0800 Committer: shaofengshi Committed: Wed Oct 12 09:25:24 2016 +0800 -- .../apache/kylin/metadata/model/ColumnDesc.java | 13 ++ examples/sample_cube/create_sample_tables.sql | 49 +++- .../source/hive/HiveSourceTableLoader.java | 1 + webapp/app/js/model/tableConfig.js | 3 +- webapp/app/partials/tables/table_detail.html| 4 ++ 5 files changed, 46 insertions(+), 24 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/58afe010/core-metadata/src/main/java/org/apache/kylin/metadata/model/ColumnDesc.java -- diff --git a/core-metadata/src/main/java/org/apache/kylin/metadata/model/ColumnDesc.java b/core-metadata/src/main/java/org/apache/kylin/metadata/model/ColumnDesc.java index 257cb3b..d131b92 100644 --- a/core-metadata/src/main/java/org/apache/kylin/metadata/model/ColumnDesc.java +++ b/core-metadata/src/main/java/org/apache/kylin/metadata/model/ColumnDesc.java @@ -20,6 +20,7 @@ package org.apache.kylin.metadata.model; import java.io.Serializable; +import com.fasterxml.jackson.annotation.JsonInclude; import org.apache.commons.lang.StringUtils; import org.apache.kylin.metadata.datatype.DataType; @@ -51,6 +52,9 @@ public class ColumnDesc implements Serializable { private String name; @JsonProperty("datatype") private String datatype; +@JsonProperty("comment") +@JsonInclude(JsonInclude.Include.NON_NULL) +private String comment; // parsed from data type private DataType type; @@ -109,6 +113,14 @@ public class ColumnDesc implements Serializable { this.table = table; } +public String getComment() { +return comment; +} + +public void setComment(String comment) { +this.comment = comment; +} + public DataType getType() { return type; } @@ -195,6 +207,7 @@ public class ColumnDesc implements Serializable { "id='" + id + '\'' + ", name='" + name + '\'' + ", datatype='" + datatype + '\'' + +", comment='" + comment + '\'' + '}'; } } http://git-wip-us.apache.org/repos/asf/kylin/blob/58afe010/examples/sample_cube/create_sample_tables.sql -- diff --git a/examples/sample_cube/create_sample_tables.sql b/examples/sample_cube/create_sample_tables.sql index 8399ee8..fa5e25b 100644 --- a/examples/sample_cube/create_sample_tables.sql +++ b/examples/sample_cube/create_sample_tables.sql @@ -20,11 +20,11 @@ DROP TABLE IF EXISTS DEFAULT.KYLIN_CAL_DT; CREATE TABLE DEFAULT.KYLIN_CAL_DT ( -CAL_DT date -,YEAR_BEG_DT date -,QTR_BEG_DT date -,MONTH_BEG_DT date -,WEEK_BEG_DT date +CAL_DT date COMMENT 'Date, PK' +,YEAR_BEG_DT date COMMENT 'YEAR Begin Date' +,QTR_BEG_DT date COMMENT 'Quarter Begin Date' +,MONTH_BEG_DT date COMMENT 'Month Begin Date' +,WEEK_BEG_DT date COMMENT 'Week Begin Date' ,AGE_FOR_YEAR_ID smallint ,AGE_FOR_QTR_ID smallint ,AGE_FOR_MONTH_ID smallint @@ -121,6 +121,7 @@ CAL_DT date ,UPD_DATE string ,UPD_USER string ) +COMMENT 'Date Dimension Table' ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' STORED AS TEXTFILE; @@ -128,28 +129,28 @@ DROP TABLE IF EXISTS DEFAULT.KYLIN_CATEGORY_GROUPINGS; CREATE TABLE DEFAULT.KYLIN_CATEGORY_GROUPINGS ( -LEAF_CATEG_ID bigint +LEAF_CATEG_ID bigint COMMENT 'Category ID, PK' ,LEAF_CATEG_NAME string -,SITE_ID int +,SITE_ID int COMMENT 'Site ID, PK' ,CATEG_BUSN_MGR string ,CATEG_BUSN_UNIT string ,REGN_CATEG string -,USER_DEFINED_FIELD1 string -,USER_DEFINED_FIELD3 string +,USER_DEFINED_FIELD1 string COMMENT 'User Defined Field1' +,USER_DEFINED_FIELD3 string COMMENT 'User Defined Field3' ,CRE_DATE string -,UPD_DATE string +,UPD_DATE string COMMENT 'Last Updated Date' ,CRE_USER string -,UPD_USER string +,UPD_USER string COMMENT 'Last Updated User' ,META_CATEG_ID decimal -,META_CATEG_NAME string +,META_CATEG_NAME string COMMENT 'Level1 Category' ,CATEG_LVL2_ID decimal ,CATEG_LVL3_ID decimal ,CATEG_LVL4_ID decimal ,CATEG_LVL5_ID decimal ,CATEG_LVL6_ID decimal ,CATEG_LVL7_ID decimal -,CATEG_LVL2_NAME string -,CATEG_LVL3_NAME string +,CATEG_LVL2_NAME string
[18/50] [abbrv] kylin git commit: KYLIN-2068: add optional comment column when sync hive table columns
KYLIN-2068: add optional comment column when sync hive table columns Signed-off-by: shaofengshiProject: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/58afe010 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/58afe010 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/58afe010 Branch: refs/heads/master-hbase1.x Commit: 58afe0103098dd0845cb50a0751e3305a973f834 Parents: 460536c Author: Yiming Liu Authored: Mon Oct 10 23:49:19 2016 +0800 Committer: shaofengshi Committed: Wed Oct 12 09:25:24 2016 +0800 -- .../apache/kylin/metadata/model/ColumnDesc.java | 13 ++ examples/sample_cube/create_sample_tables.sql | 49 +++- .../source/hive/HiveSourceTableLoader.java | 1 + webapp/app/js/model/tableConfig.js | 3 +- webapp/app/partials/tables/table_detail.html| 4 ++ 5 files changed, 46 insertions(+), 24 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/58afe010/core-metadata/src/main/java/org/apache/kylin/metadata/model/ColumnDesc.java -- diff --git a/core-metadata/src/main/java/org/apache/kylin/metadata/model/ColumnDesc.java b/core-metadata/src/main/java/org/apache/kylin/metadata/model/ColumnDesc.java index 257cb3b..d131b92 100644 --- a/core-metadata/src/main/java/org/apache/kylin/metadata/model/ColumnDesc.java +++ b/core-metadata/src/main/java/org/apache/kylin/metadata/model/ColumnDesc.java @@ -20,6 +20,7 @@ package org.apache.kylin.metadata.model; import java.io.Serializable; +import com.fasterxml.jackson.annotation.JsonInclude; import org.apache.commons.lang.StringUtils; import org.apache.kylin.metadata.datatype.DataType; @@ -51,6 +52,9 @@ public class ColumnDesc implements Serializable { private String name; @JsonProperty("datatype") private String datatype; +@JsonProperty("comment") +@JsonInclude(JsonInclude.Include.NON_NULL) +private String comment; // parsed from data type private DataType type; @@ -109,6 +113,14 @@ public class ColumnDesc implements Serializable { this.table = table; } +public String getComment() { +return comment; +} + +public void setComment(String comment) { +this.comment = comment; +} + public DataType getType() { return type; } @@ -195,6 +207,7 @@ public class ColumnDesc implements Serializable { "id='" + id + '\'' + ", name='" + name + '\'' + ", datatype='" + datatype + '\'' + +", comment='" + comment + '\'' + '}'; } } http://git-wip-us.apache.org/repos/asf/kylin/blob/58afe010/examples/sample_cube/create_sample_tables.sql -- diff --git a/examples/sample_cube/create_sample_tables.sql b/examples/sample_cube/create_sample_tables.sql index 8399ee8..fa5e25b 100644 --- a/examples/sample_cube/create_sample_tables.sql +++ b/examples/sample_cube/create_sample_tables.sql @@ -20,11 +20,11 @@ DROP TABLE IF EXISTS DEFAULT.KYLIN_CAL_DT; CREATE TABLE DEFAULT.KYLIN_CAL_DT ( -CAL_DT date -,YEAR_BEG_DT date -,QTR_BEG_DT date -,MONTH_BEG_DT date -,WEEK_BEG_DT date +CAL_DT date COMMENT 'Date, PK' +,YEAR_BEG_DT date COMMENT 'YEAR Begin Date' +,QTR_BEG_DT date COMMENT 'Quarter Begin Date' +,MONTH_BEG_DT date COMMENT 'Month Begin Date' +,WEEK_BEG_DT date COMMENT 'Week Begin Date' ,AGE_FOR_YEAR_ID smallint ,AGE_FOR_QTR_ID smallint ,AGE_FOR_MONTH_ID smallint @@ -121,6 +121,7 @@ CAL_DT date ,UPD_DATE string ,UPD_USER string ) +COMMENT 'Date Dimension Table' ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' STORED AS TEXTFILE; @@ -128,28 +129,28 @@ DROP TABLE IF EXISTS DEFAULT.KYLIN_CATEGORY_GROUPINGS; CREATE TABLE DEFAULT.KYLIN_CATEGORY_GROUPINGS ( -LEAF_CATEG_ID bigint +LEAF_CATEG_ID bigint COMMENT 'Category ID, PK' ,LEAF_CATEG_NAME string -,SITE_ID int +,SITE_ID int COMMENT 'Site ID, PK' ,CATEG_BUSN_MGR string ,CATEG_BUSN_UNIT string ,REGN_CATEG string -,USER_DEFINED_FIELD1 string -,USER_DEFINED_FIELD3 string +,USER_DEFINED_FIELD1 string COMMENT 'User Defined Field1' +,USER_DEFINED_FIELD3 string COMMENT 'User Defined Field3' ,CRE_DATE string -,UPD_DATE string +,UPD_DATE string COMMENT 'Last Updated Date' ,CRE_USER string -,UPD_USER string +,UPD_USER string COMMENT 'Last Updated User' ,META_CATEG_ID decimal -,META_CATEG_NAME string +,META_CATEG_NAME string COMMENT 'Level1 Category' ,CATEG_LVL2_ID decimal ,CATEG_LVL3_ID decimal ,CATEG_LVL4_ID decimal ,CATEG_LVL5_ID decimal ,CATEG_LVL6_ID decimal ,CATEG_LVL7_ID decimal -,CATEG_LVL2_NAME string -,CATEG_LVL3_NAME string +,CATEG_LVL2_NAME string
kylin git commit: KYLIN-2068: add optional comment column when sync hive table columns
Repository: kylin Updated Branches: refs/heads/master 460536c00 -> 58afe0103 KYLIN-2068: add optional comment column when sync hive table columns Signed-off-by: shaofengshiProject: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/58afe010 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/58afe010 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/58afe010 Branch: refs/heads/master Commit: 58afe0103098dd0845cb50a0751e3305a973f834 Parents: 460536c Author: Yiming Liu Authored: Mon Oct 10 23:49:19 2016 +0800 Committer: shaofengshi Committed: Wed Oct 12 09:25:24 2016 +0800 -- .../apache/kylin/metadata/model/ColumnDesc.java | 13 ++ examples/sample_cube/create_sample_tables.sql | 49 +++- .../source/hive/HiveSourceTableLoader.java | 1 + webapp/app/js/model/tableConfig.js | 3 +- webapp/app/partials/tables/table_detail.html| 4 ++ 5 files changed, 46 insertions(+), 24 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/58afe010/core-metadata/src/main/java/org/apache/kylin/metadata/model/ColumnDesc.java -- diff --git a/core-metadata/src/main/java/org/apache/kylin/metadata/model/ColumnDesc.java b/core-metadata/src/main/java/org/apache/kylin/metadata/model/ColumnDesc.java index 257cb3b..d131b92 100644 --- a/core-metadata/src/main/java/org/apache/kylin/metadata/model/ColumnDesc.java +++ b/core-metadata/src/main/java/org/apache/kylin/metadata/model/ColumnDesc.java @@ -20,6 +20,7 @@ package org.apache.kylin.metadata.model; import java.io.Serializable; +import com.fasterxml.jackson.annotation.JsonInclude; import org.apache.commons.lang.StringUtils; import org.apache.kylin.metadata.datatype.DataType; @@ -51,6 +52,9 @@ public class ColumnDesc implements Serializable { private String name; @JsonProperty("datatype") private String datatype; +@JsonProperty("comment") +@JsonInclude(JsonInclude.Include.NON_NULL) +private String comment; // parsed from data type private DataType type; @@ -109,6 +113,14 @@ public class ColumnDesc implements Serializable { this.table = table; } +public String getComment() { +return comment; +} + +public void setComment(String comment) { +this.comment = comment; +} + public DataType getType() { return type; } @@ -195,6 +207,7 @@ public class ColumnDesc implements Serializable { "id='" + id + '\'' + ", name='" + name + '\'' + ", datatype='" + datatype + '\'' + +", comment='" + comment + '\'' + '}'; } } http://git-wip-us.apache.org/repos/asf/kylin/blob/58afe010/examples/sample_cube/create_sample_tables.sql -- diff --git a/examples/sample_cube/create_sample_tables.sql b/examples/sample_cube/create_sample_tables.sql index 8399ee8..fa5e25b 100644 --- a/examples/sample_cube/create_sample_tables.sql +++ b/examples/sample_cube/create_sample_tables.sql @@ -20,11 +20,11 @@ DROP TABLE IF EXISTS DEFAULT.KYLIN_CAL_DT; CREATE TABLE DEFAULT.KYLIN_CAL_DT ( -CAL_DT date -,YEAR_BEG_DT date -,QTR_BEG_DT date -,MONTH_BEG_DT date -,WEEK_BEG_DT date +CAL_DT date COMMENT 'Date, PK' +,YEAR_BEG_DT date COMMENT 'YEAR Begin Date' +,QTR_BEG_DT date COMMENT 'Quarter Begin Date' +,MONTH_BEG_DT date COMMENT 'Month Begin Date' +,WEEK_BEG_DT date COMMENT 'Week Begin Date' ,AGE_FOR_YEAR_ID smallint ,AGE_FOR_QTR_ID smallint ,AGE_FOR_MONTH_ID smallint @@ -121,6 +121,7 @@ CAL_DT date ,UPD_DATE string ,UPD_USER string ) +COMMENT 'Date Dimension Table' ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' STORED AS TEXTFILE; @@ -128,28 +129,28 @@ DROP TABLE IF EXISTS DEFAULT.KYLIN_CATEGORY_GROUPINGS; CREATE TABLE DEFAULT.KYLIN_CATEGORY_GROUPINGS ( -LEAF_CATEG_ID bigint +LEAF_CATEG_ID bigint COMMENT 'Category ID, PK' ,LEAF_CATEG_NAME string -,SITE_ID int +,SITE_ID int COMMENT 'Site ID, PK' ,CATEG_BUSN_MGR string ,CATEG_BUSN_UNIT string ,REGN_CATEG string -,USER_DEFINED_FIELD1 string -,USER_DEFINED_FIELD3 string +,USER_DEFINED_FIELD1 string COMMENT 'User Defined Field1' +,USER_DEFINED_FIELD3 string COMMENT 'User Defined Field3' ,CRE_DATE string -,UPD_DATE string +,UPD_DATE string COMMENT 'Last Updated Date' ,CRE_USER string -,UPD_USER string +,UPD_USER string COMMENT 'Last Updated User' ,META_CATEG_ID decimal -,META_CATEG_NAME string +,META_CATEG_NAME string COMMENT 'Level1 Category' ,CATEG_LVL2_ID decimal ,CATEG_LVL3_ID decimal ,CATEG_LVL4_ID decimal ,CATEG_LVL5_ID decimal ,CATEG_LVL6_ID decimal ,CATEG_LVL7_ID decimal