This file contains hidden or 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
SET 'execution.runtime-mode' = 'batch'; | |
SELECT * FROM product_orders_report ORDER BY report_timestamp desc; |
This file contains hidden or 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
CREATE TABLE product_orders_report | |
( | |
report_id BIGINT, | |
report_timestamp TIMESTAMP, | |
report_year_month STRING, | |
product_id BIGINT, | |
product_quantity_sum BIGINT | |
) PARTITIONED BY (report_year_month); |
This file contains hidden or 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
CREATE CATALOG nessie_catalog WITH ( | |
'type'='iceberg', | |
'catalog-impl'='org.apache.iceberg.nessie.NessieCatalog', | |
'io-impl'='org.apache.iceberg.aws.s3.S3FileIO', | |
'uri'='http://nessie:19120/api/v2', | |
'warehouse' = 's3://warehouse', | |
's3.endpoint'='http://minio:9000' | |
); | |
USE CATALOG nessie_catalog; |
This file contains hidden or 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
INSERT INTO products (id, name, product_category, current_prise) | |
VALUES (1, 'Basic Widget', 0, 9.99), | |
(2, 'Premium Widget', 1, 19.99), | |
(3, 'Basic Gadget', 0, 14.99), | |
(4, 'Premium Gadget', 1, 29.99), | |
(5, 'Basic Tool', 0, 24.99), | |
(6, 'Premium Tool', 1, 49.99); | |
INSERT INTO orders (order_timestamp, order_date, id, customer_id) | |
VALUES (TO_TIMESTAMP('2024-09-12 14:25:30'), '2024-09-12', 1001, 2001), |
This file contains hidden or 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
CREATE TABLE orders | |
( | |
order_timestamp TIMESTAMP, | |
order_date STRING, | |
id BIGINT, | |
customer_id BIGINT | |
) PARTITIONED BY (order_date); | |
CREATE TABLE products | |
( |
This file contains hidden or 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
CREATE TABLE dumb | |
( | |
foo STRING | |
); |
This file contains hidden or 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
CREATE CATALOG nessie_catalog WITH ( | |
'type'='iceberg', | |
'catalog-impl'='org.apache.iceberg.nessie.NessieCatalog', | |
'io-impl'='org.apache.iceberg.aws.s3.S3FileIO', | |
'uri'='http://nessie:19120/api/v2', | |
'warehouse' = 's3://warehouse', | |
's3.endpoint'='http://minio:9000' | |
); | |
USE CATALOG nessie_catalog; |
This file contains hidden or 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
docker compose exec flink-jobmanager sql-client.sh |
This file contains hidden or 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
classloader.parent-first-patterns.additional: com.codahale.metrics;org.apache.iceberg;org.projectnessie |
This file contains hidden or 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
ARG FLINK_VERSION_SHORT | |
ARG HADOOP_VERSION | |
ARG FLINK_HADOOP_VERSION | |
ARG AWS_SDK_VERSION | |
ARG ICEBERG_VERSION | |
RUN curl -L "https://repo1.maven.org/maven2/org/apache/hadoop/hadoop-common/${HADOOP_VERSION}/hadoop-common-${HADOOP_VERSION}.jar" \ | |
-o ${FLINK_HOME}/lib/hadoop-common-${HADOOP_VERSION}.jar | |
RUN curl -L "https://repo.maven.apache.org/maven2/org/apache/flink/flink-shaded-hadoop-2-uber/${FLINK_HADOOP_VERSION}/flink-shaded-hadoop-2-uber-${FLINK_HADOOP_VERSION}.jar" \ |
NewerOlder