question

HetaDesai-5854 avatar image
0 Votes"
HetaDesai-5854 asked PRADEEPCHEEKATLA-MSFT commented

How to connect to NetSuit database from Azure synapse spark notebook using pyspark ?

I want to connect to the NetSuit database from Azure synapse spark notebook using pyspark. While using the below command it throws an error.

 jdbcDF = spark.read.format("cdata.jdbc.netsuite.NetSuiteDriver") \
     .option("url", url) \
     .option("user", user) \
     .option("password", password) \
     .option("query",query) \
     .load()

Error: Py4JJavaError: An error occurred while calling o649.load.
: java.lang.ClassNotFoundException: Failed to find data source: cdata.jdbc.netsuite.NetSuiteDriver. Please find packages at http://spark.apache.org/third-party-projects.html


azure-synapse-analytics
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @HetaDesai-5854,

Thanks for the question and using MS Q&A platform.

From the error message - it clearly says the cdata.jdbc.netsuite.NetSuiteDriver does not exists on the Spark Runtime?

Make sure you have download the required jar file and upload the jar file to the workspace packages.

For more details, refer to Manage Scala and Java packages for Apache Spark in Azure Synapse Analytics and Process & Analyze NetSuite Data in Azure Databricks.

Hope this helps.

0 Votes 0 ·
HetaDesai-5854 avatar image HetaDesai-5854 PRADEEPCHEEKATLA-MSFT ·

It asks for configuration file to install the package. How to create that configuration file to install the package into spark pool of Azure Synapse.

0 Votes 0 ·

Hello @HetaDesai-5854,

As I said above, you can download the required jar file and upload the jar file to the workspace packages.

0 Votes 0 ·

0 Answers