Support Questions

Find answers, ask questions, and share your expertise

error with insert statement in puthiveql processor in nifi

New Contributor

I have a data flow where I want read data from HDFS and write it to the hive table. My data flow: 1. GetHDFS 2. Split text ( split the file by 1 line, as each line is valid json string) 3. splitjson ( to read the requird josn object, in my case its is gyrodata) 4. evaluatejson ( to select the requird attributes from gyrodata json object) Next step have done after following the this answer ( here) 5.update attribute ( where i am setting the values for "hiveql.args.N.type" and "hiveql.args.N.value") as shown below

16175-updateattribute.png

6.replacetext processor to write the insert statement "INSERT INTO TABLE gyroscope PARTITION(carbox_id ='Carboxtest') VALUES( ?, ?, ?, ?, ?,?, ?, ?);" I tried the insert statement ending with semicolumn and without semicolumn but same error 😞

16176-replacetext.png

7. puthiveql processor with below error ':

16177-error.png

please find below my complete flow :

16178-completeflow.png

1 REPLY 1

Super Guru

The EOFs in the HiveQL statement look a little odd. Can you try "Entire Text" for the Evaluation Mode property in your ReplaceText processor? Also, leave off the semicolon unless you are using NiFi 1.2.0+ (added via NIFI-3031).