Created on 07-25-2019 03:44 PM - edited 08-17-2019 04:33 PM
AVRO TO JSON produce content like below:
{
"id" : 92,
"title" : "mr",
"first" : "Alvin",
"last" : "Lau"
}
convertjsontosql produce content like below:
INSERT INTO nifi.copysql (id, title, first, last) VALUES (?, ?, ?, ?)
Attached is the convertjsontosql processor setting.
@Matt Burgess please assist
Created 07-26-2019 01:30 AM
This is an expected behaviour from ConvertJSONToSql processor and if you want to view the values for columns check flowfile attributes.
Refer to this link for more details regards to similar question
Created 07-26-2019 08:16 AM
This is the error if I process the queue with the above content in PuthiiveQL
- PutHiveQL[id=89b230de-8dc5-18e0-9cac-668cfe8085b0] Failed to update Hive for StandardFlowFileRecord[uuid=1bb63fbe-29af-4422-b8a3-a282063514e8,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1564127716134-1, container=default, section=1], offset=186312, length=69],offset=0,name=9d11a5b0-78e8-43f1-9514-9e4c4509855c,size=69] due to Error while compiling statement: FAILED: ParseException line 1:58 cannot recognize input near '?' ',' '?' in value row constructor; routing to failure: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 1:58 cannot recognize input near '?' ',' '?' in value row constructor
Created 07-26-2019 08:13 AM
This is the error if I process the queue with the above content in PuthiiveQL
16:11:15 SGT
ERROR
89b230de-8dc5-18e0-9cac-668cfe8085b0
PutHiveQL[id=89b230de-8dc5-18e0-9cac-668cfe8085b0] Failed to update Hive for StandardFlowFileRecord[uuid=1bb63fbe-29af-4422-b8a3-a282063514e8,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1564127716134-1, container=default, section=1], offset=186312, length=69],offset=0,name=9d11a5b0-78e8-43f1-9514-9e4c4509855c,size=69] due to Error while compiling statement: FAILED: ParseException line 1:58 cannot recognize input near '?' ',' '?' in value row constructor; routing to failure: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 1:58 cannot recognize input near '?' ',' '?' in value row constructor