用nifi把hdfs数据导到hive

全景图:

NewImage 

 

1. ListHDFS & FetchHDFS:

ListHDFS:

NewImage

 

FetchHDFS:

NewImage

 

2. EvaluateJsonPath:

{"status": {"code":500,"message":"FAILED","detail":"DTU ID not exists"}}

NewImage

如果json里有数组,需要先用SplitJson分隔:

NewImage

 

 

3. RouteOnContent:

NewImage

 

4. ReplaceText:

先在hive里创建一个表:

create table tb_test(
register string,
register_url string
);

 
NewImage
insert into yongli.tb_test(register, register_url)values('${register}','${register_url}')

 

5. PutHiveQL:

创建一个HiveConnectionPool

NewImage

 

设置Database Connection URL, User, Password:

NewImage

posted @ 2016-08-22 14:48  疯吻IT  阅读(2339)  评论(0编辑  收藏  举报