Support Questions

Find answers, ask questions, and share your expertise

Unable to fetch data from hive table using Apache NiFi (ExecuteSQL processor)

avatar
Contributor

Hi,

I am trying to fetch data from hive table (ExecuteSQL) and load into file system(PutFile). I have kept all required hive

jar in lib folder of nifi. However getting Error message in ExecuteSQL processor. Please let me know if i have done any mistake anywhere and help me to complete the job.

5705-capture15.png

5701-capture10.png

5702-capture11.png

5703-capture13.png

5704-capture14.png

1 ACCEPTED SOLUTION

avatar
Contributor

If you are using HDF 1.2, unfortunately the ExecuteSQL processor doesn't work with hive, yet. The Hive processor is on the roadmap and may be included in the next release.

View solution in original post

8 REPLIES 8

avatar
Contributor

If you are using HDF 1.2, unfortunately the ExecuteSQL processor doesn't work with hive, yet. The Hive processor is on the roadmap and may be included in the next release.

avatar
Super Collaborator

Just an update - the 'SelectHiveQL' has been added as part of Nifi 0.7

avatar
Super Collaborator

There must be a new nifi processor 'SelectHiveQL' that queries from hive. Also, there is a processor now to insert or update data directly to hive 'PutHiveQL'

avatar
Rising Star

HI @hduraiswamy, i need to know the steps involved in upgrading the HDF nifi(version 0.6.0.1.2.0.1-1) to to 0.7 version. My current version doesn't have 'SelectHiveQL' and 'PutHiveQL' processors. Pls share...it helps lot

avatar
Super Collaborator

@Iyappan Gopalakrishnan

Follow the below steps:

  • save your hdf flow files to xml templates
  • download the nifi 0.7 from apache nifi downloads site (https://nifi.apache.org/download.html)
  • unzip the file, edit the port (if you would like) and start nifi
  • import the templates

If this answer and comment is helpful, please upvote my answer and/or select as best answer. Thank you!!

avatar
Rising Star

Hi @hduraiswamy

Thanks for your replay

  • My issue is how to start 0.7 nifi. I'm having HDF 0.6.0.1.2.0.1-1 version and downloaded from Hortonworks.
  • If i need to start my Nifi is \bin\run-nifi.bat
  • Here(0.7) not having same file structure of 0.6.0.1.2.0.1-1
  • Please explain briefly

Thanks

Iyappan

avatar
Super Collaborator

@Iyappan Gopalakrishnan

  • Download the nifi-0.7.0-bin.zip file from the downloads link https://nifi.apache.org/download.html
  • After that, if you unzip the file, you will see the folder structure similar to this one below:

6410-screen-shot-2016-08-06-at-55107-pm.png

  • Then based on the OS, you can either use 'bin/run-nifi.bat' for windows or 'bin/nifi.sh start' for mac/linux. More details on how to start nifi is here https://nifi.apache.org/docs/nifi-docs/html/getting-started.html#starting-nifi
  • You can tail the logs from logs/nifi-app.log (to see if it starts properly)
  • OPTIONAL: By default, nifi starts on port 8080 - but if you see any port conflict or want to start this on a different port, you can change that by editing the file 'conf/nifi.properties', search for 8080 and update the port number.

If you like the answer, please make sure to upvote or accept the answer.

avatar
Rising Star

Thanks @hduraiswamy

I made mistake on download itself now its working fine......Thanks once again...