用nifi把hdfs数据导到hive
全景图:
1. ListHDFS & FetchHDFS:
ListHDFS:
FetchHDFS:
2. EvaluateJsonPath:
{"status": {"code":500,"message":"FAILED","detail":"DTU ID not exists"}}
如果json里有数组,需要先用SplitJson分隔:
3. RouteOnContent:
4. ReplaceText:
先在hive里创建一个表:
create table tb_test(
register string,
register_url string
);
insert into yongli.tb_test(register, register_url)values('${register}','${register_url}')
5. PutHiveQL:
创建一个HiveConnectionPool
设置Database Connection URL, User, Password: