set execution.checkpointing.interval = 30s;
set state.checkpoints.dir=hdfs://xxxx:8020/cluster/flink/checkpointes_;
set state.savepoints.dir=hdfs://xxxx:8020/cluster/flink/savepointkes_;
CREATE TABLE source_table (
userId INT,
age INT,
balance DOUBLE,
userName STRING,
t_insert_time AS localtimestamp,
WATERMARK FOR t_insert_time AS t_insert_time
) WITH (
'connector' = 'datagen',
'rows-per-second'='5',
'fields.userId.kind'='sequence',
'fields.userId.start'='1',
'fields.userId.end'='5000',
'fields.balance.kind'='random',
'fields.balance.min'='1',
'fields.balance.max'='100',
'fields.age.min'='1',
'fields.age.max'='1000',
'fields.userName.length'='10'
);
select * from source_table;
flink造数据
最新推荐文章于 2024-11-13 22:59:36 发布