Skip to content

Commit

Permalink
[hotfix][doc] Fix minor error in hive_streaming.md
Browse files Browse the repository at this point in the history
  • Loading branch information
JingsongLi committed Jun 15, 2020
1 parent 97fc6b3 commit 5e43f01
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/dev/table/hive/hive_streaming.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ SET table.sql-dialect=hive;
CREATE TABLE hive_table (
user_id STRING,
order_amount DOUBLE
) PARTITIONED BY (dt STRING, hour STRING) STORED AS parquet TBLPROPERTIES (
'partition.time-extractor.timestamp-pattern'='$dt $hour:00:00',
) PARTITIONED BY (dt STRING, hr STRING) STORED AS parquet TBLPROPERTIES (
'partition.time-extractor.timestamp-pattern'='$dt $hr:00:00',
'sink.partition-commit.trigger'='partition-time',
'sink.partition-commit.delay'='1 h',
'sink.partition-commit.policy.kind'='metastore,success-file'
Expand All @@ -94,7 +94,7 @@ CREATE TABLE kafka_table (
INSERT INTO TABLE hive_table SELECT user_id, order_amount, DATE_FORMAT(log_ts, 'yyyy-MM-dd'), DATE_FORMAT(log_ts, 'HH') FROM kafka_table;

-- batch sql, select with partition pruning
SELECT * FROM hive_table WHERE dt='2020-05-20' and hour='12';
SELECT * FROM hive_table WHERE dt='2020-05-20' and hr='12';

{% endhighlight %}

Expand Down
6 changes: 3 additions & 3 deletions docs/dev/table/hive/hive_streaming.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ SET table.sql-dialect=hive;
CREATE TABLE hive_table (
user_id STRING,
order_amount DOUBLE
) PARTITIONED BY (dt STRING, hour STRING) STORED AS parquet TBLPROPERTIES (
'partition.time-extractor.timestamp-pattern'='$dt $hour:00:00',
) PARTITIONED BY (dt STRING, hr STRING) STORED AS parquet TBLPROPERTIES (
'partition.time-extractor.timestamp-pattern'='$dt $hr:00:00',
'sink.partition-commit.trigger'='partition-time',
'sink.partition-commit.delay'='1 h',
'sink.partition-commit.policy.kind'='metastore,success-file'
Expand All @@ -94,7 +94,7 @@ CREATE TABLE kafka_table (
INSERT INTO TABLE hive_table SELECT user_id, order_amount, DATE_FORMAT(log_ts, 'yyyy-MM-dd'), DATE_FORMAT(log_ts, 'HH') FROM kafka_table;

-- batch sql, select with partition pruning
SELECT * FROM hive_table WHERE dt='2020-05-20' and hour='12';
SELECT * FROM hive_table WHERE dt='2020-05-20' and hr='12';

{% endhighlight %}

Expand Down

0 comments on commit 5e43f01

Please sign in to comment.