Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to extract multiple attribute value from flow file and insert that in mysql table?

How to extract multiple attribute value from flow file and insert that in mysql table?

Explorer

Hello,

I have created a custom processor same as mysql ,

In that fetch queryID,query Start time,query end time from resultset and added that value in flowfile and flow file output obtained in json format,

[{"r_regionkey":"0","r_name":"AFRICA","r_comment":"lar deposits. blithely final packages cajole. regular waters are final requests. "},
{"r_regionkey":"1","r_name":"AMERICA ","r_comment":"hs use ironic, even requests. s"},
{"r_regionkey":"2","r_name":"ASIA ","r_comment":"ges. thinly even pinto beans ca"},
{"r_regionkey":"3","r_name":"EUROPE","r_comment":"ly final courts cajole furiously final excuse"},
{"r_regionkey":"4","r_name":"MIDDLE EAST","r_comment":"uickly special accounts cajole carefully blithely close requests."},
{"Query_ID":"20171006_044330_00004_qtmrh","Query_StartTime":"2017-10-06 10:13:30.516","Query_EndTime":"2017-10-06 10:13:30.646"}]

I have to insert QueryID, Query_StartTime, Query_EndTime in mysql table.

Can someone please point me in the right direction how to do that.

Don't have an account?
Coming from Hortonworks? Activate your account here