-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DE-6354: Add Kafka-Iceberg with Flink example code (#16)
* Updates * update * Added readme, sample SQL files, fixed deps, etc * Update readme * update readme
- Loading branch information
Showing
9 changed files
with
497 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
kafka-iceberg/apache-flink/kafka-to-iceberg-multi-statement.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
INSERT INTO t_i_orders | ||
SELECT * | ||
FROM t_k_orders | ||
WHERE cost > 100; | ||
UNION ALL | ||
SELECT ko.* | ||
FROM t_k_orders ko | ||
INNER JOIN | ||
customers c | ||
ON ko.customerId = c.customerId | ||
WHERE c.vip_status = 'Gold'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
CREATE TABLE t_k_orders | ||
( | ||
orderId STRING, | ||
customerId STRING, | ||
orderNumber INT, | ||
product STRING, | ||
backordered BOOLEAN, | ||
cost FLOAT, | ||
description STRING, | ||
create_ts BIGINT, | ||
creditCardNumber STRING, | ||
discountPercent INT | ||
) WITH ( | ||
'connector' = 'kafka', | ||
'topic' = 'orders', | ||
'properties.bootstrap.servers' = 'broker:29092', | ||
'scan.startup.mode' = 'earliest-offset', | ||
'format' = 'json' | ||
); | ||
|
||
|
||
SET 'execution.checkpointing.interval' = '60sec'; | ||
SET 'pipeline.operator-chaining.enabled' = 'false'; | ||
|
||
CREATE TABLE t_i_orders | ||
WITH ( | ||
'connector' = 'iceberg', | ||
'catalog-type'='hive', | ||
'catalog-name'='dev', | ||
'warehouse' = 's3a://warehouse', | ||
'hive-conf-dir' = './conf') | ||
AS | ||
SELECT * FROM t_k_orders | ||
WHERE cost > 100; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters