首页  

flink dataset 测试数据说明     所属分类 flink 浏览量 1046
测试数据
交易转账事件数据

event_id event_time account_from  account_to  amount  trade_type
event_id       事件ID  事件唯一标识
event_time     事件时间
account_from   转出账户
account_to     收款账户
amount         转账金额
trade_type     交易类型


1,2021-01-01 00:00:00,a,b,1,1
2,2021-01-02 00:00:00,a,c,2,1
3,2021-01-03 00:00:00,b,a,3,1
4,2021-01-03 01:00:00,a,d,4,1
5,2021-01-03 02:00:00,a,b,5,1
6,2021-01-03 03:00:00,a,b,6,1
7,2021-01-03 04:00:00,b,c,1,1
8,2021-01-03 05:00:00,b,a,2,1
9,2021-01-04 00:00:00,b,a,3,1
10,2021-01-05 00:00:00,a,c,3,1
11,2021-01-05 01:00:00,a,c,5,1



String file = "file:/path/events.txt";
DataSet<Tuple5<String,String,String,String, Double>> csvInput = env.readCsvFile(file)
               .types(String.class,String.class,String.class,String.class, Double.class)             


注意数据文件不能包含空行,否则报错
org.apache.flink.api.common.io.ParseException: Row too short

上一篇     下一篇
spring事务隔离级别设置

mysql show processlist State 含义

MySQL查看事务和锁状态

flink datasset sortPartition 实例

flink dataset groupBy sortGroup 实例

flink dataset 输出注意点