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.

Execute DDl using PUTHiveql in nifi

Execute DDl using PUTHiveql in nifi

Rising Star

Hi,

I have been reading a json file and storing in HDFS in normal csv format. I have created my hive table manually from hive currently and i want to do it using nifi . I have read we can do it using Puthiveql processor but i can't find any attribute here in the processor to insert DDl like we get in selectHIVEql processor.

64605-puthiveql.png

1 REPLY 1
Highlighted

Re: Execute DDl using PUTHiveql in nifi

Super Guru
@Vaibhav Kumar

hive.ddl attribute will be added to the flowfile if we use ConvertAvroToORC processor, as you are using json file

1.use ConvertJsonToAvro processor then

2.ConvertAvroToORC processor after this processor you are going to have hive.ddl attribute will be added to the flowfile.

3.Use Replacetext processor to keep the hive.ddl attribute value as flowfile content

4.PutHiveQL processor to execute the hive ddl.

Reference how to use hive.ddl and puthiveql processors.

https://community.hortonworks.com/articles/87632/ingesting-sql-server-tables-into-hive-via-apache-n....

Reference how to convertJsontoAvro
https://community.hortonworks.com/questions/70474/nifi-inferavroschema.html

https://community.hortonworks.com/articles/28341/converting-csv-to-avro-with-apache-nifi.html

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