Not saying this is a problem but, based on the screenshot, it seems you're
using NiFi 1.4 which is a *very* old version. Using the latest is probably
a good idea.

Thanks,
Pierre

Le mer. 9 févr. 2022 à 18:02, ajaz rahman <[email protected]> a écrit :

> Hi,
>
> yes we are using phoenix-client-hbase jar. I have copied this one from my
> CDP edge node to nifi. There were couple of other jars in the same folders
> where i found phoenix-client. I have not copied them to nifi. I will try to
> copy those and try to see if it works. Thanks for the clue.
>
> Thanks
> Ajaz-Ur-Rahman
>
> On Wednesday, February 9, 2022, 06:00:02 PM GMT+5, Shawn Weeks <
> [email protected]> wrote:
>
>
> It’s been a while, but I’ve connected to Phoenix using NiFi. It looks like
> the jdbc jar your using on the NiFi side is newer than what you have
> deployed to your Cloudera Environment. Are you using
> phoenix-client-hbase-2.2-5.1.0.7.1.6.0-297.jar in NiFi? There used to be
> additional jars that had to be in the same folder too, not sure if that’s
> the case now.
>
>
>
> Thanks
>
> Shawn
>
>
>
> *From:* ajaz rahman <[email protected]>
> *Sent:* Wednesday, February 9, 2022 5:01 AM
> *To:* [email protected]
> *Subject:* Using Jdbc Driver to connect with phoenix
>
>
>
> Hi,
>
>
>
> I am using jdbc driver to connect with CDP Phoenix from nifi.
>
>
>
> I am able to connect with CDP Phoenix using my spark code.
>
>
>
> from pyspark.sql import SparkSession
>
> spark2 =
> SparkSession.builder.appName("sparkanalysis").config("spark.driver.extraClassPath","/opt/cloudera/parcels/CDH-7.1.6-1.cdh7.1.6.p0.10506313/lib/phoenix_queryserver/phoenix-client-hbase-2.2-5.1.0.7.1.6.0-297.jar").getOrCreate()
>
>
>
> pgDF = spark2.read \
>
> .format("jdbc") \
>
> .option("url", "jdbc:phoenix:10.64.63.122:2181:/hbase") \
>
> .option("dbtable", "mydata_table") \
>
> .option("user", "") \
>
> .option("password", "") \
>
> .load()
>
>
>
> pdDF.printSchema()
>
>
>
>
>
> When trying to connect from nifi using same driver. I get error, snapshot
> is attached along this mail.  Its a very simple nifi flow with just one
> task running an SQL.
>
> Connection properties attached as snapshot.
>
>
>
> I have been trying crack this for a couple of days without success. Any
> help around this will receive a lot of love.
>
>
>
>
>
> Regards,
>
> Ajaz-Ur-Rahman
>

Reply via email to