基于antlr4 statement 解析器,支持spark sql, tidb sql, flink sql, Spark/flink jar 运行命令解析
<dependency>
<groupId>com.github.melin</groupId>
<artifactId>dataworker-sql-parser</artifactId>
<version>3.2.0</version>
</dependency>
create stream TABLE tdl_kafka_users (
user_name "/name" string,
age int,
email string
) WITH (
kafka.bootstrap.servers = 'xxx.xxx.xxx.xxx:9092',
kafka.group.id = 'dataworker-stream',
subscribe = 'users',
includeHeaders = true,
startingOffsets = 'latest',
failOnDataLoss = true,
format='json'
);
insert into bigdata.test_delta_dt select * from tdl_kafka_users;
-- {name:'zhangsan', age: 28, email:'zhangsan@gmail.com'}