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.

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

Solved Go to solution
Highlighted

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

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

Accepted Solutions
Highlighted

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

Cloudera Employee

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
Highlighted

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

Cloudera Employee

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

Highlighted

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

Expert Contributor

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

Highlighted

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

Expert Contributor

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'

Highlighted

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

Explorer

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

Highlighted

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

Expert Contributor

@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!!

Highlighted

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

Explorer

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

Highlighted

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

Expert Contributor

@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.

Highlighted

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

Explorer

Thanks @hduraiswamy

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

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