Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/MyLanPangzi/flink-demo
Flink Demo
https://github.com/MyLanPangzi/flink-demo
flink flink-examples flink-sql
Last synced: 9 days ago
JSON representation
Flink Demo
- Host: GitHub
- URL: https://github.com/MyLanPangzi/flink-demo
- Owner: MyLanPangzi
- License: mit
- Created: 2021-02-11T00:03:40.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-07-19T09:10:45.000Z (over 1 year ago)
- Last Synced: 2024-08-02T14:07:36.253Z (3 months ago)
- Topics: flink, flink-examples, flink-sql
- Language: Java
- Homepage:
- Size: 1.63 MB
- Stars: 42
- Watchers: 2
- Forks: 14
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# flink-demo
sql 代码混合执行
```sql
call com.hiscat.flink.cdc.function.MysqlCdcSourceRegister;
CREATE TABLE ods_binlog_default
(
`key` STRING,
`value` STRING,
`topic` STRING METADATA FROM 'topic'
) WITH (
'connector' = 'route-kafka',
'topic' = 'ods_binlog_default',
'properties.bootstrap.servers' = 'localhost:9092',
'key.format' = 'raw',
'key.fields' = 'key',
'value.format' = 'raw',
'value.fields-include' = 'EXCEPT_KEY',
'properties.compression.type' = 'gzip',
'properties.linger.ms' = '1000'
);INSERT INTO ods_binlog_default
SELECT `key`, `value`, get_topic(`db`, `table`)
FROM cdc;```