cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Spark JDBC Netsuite error - SQLSyntaxErrorException: [NetSuite][OpenAccess SDK JDBC Driver][OpenAcc

KristiLogos
Contributor

 

I'm  trying to query the Customer netsuite tables with spark jdbc and  I've added the .jar file to the cluster and trying to run the below:


jdbc_url = "jdbc:ns://xxxx.connect.api.netsuite.com:1708;ServerDataSource=NetSuite2.com;Encrypted=1;NegotiateSSLClose=false;CustomProperties=(AccountID=xxxx;RoleID=xxx)"


netsuite_query= f"""
(
SELECT TOP 10 * FROM Customer
) AS t
"""try:
print(f"Attempting to read using the query: {netsuite_query}")


df = spark.read \
.format("jdbc") \
.option("url", jdbc_url) \
.option("dbtable", netsuite_query) \
.option("user", "xxxx") \
.option("password", "xxx") \
.option("driver", "com.netsuite.jdbc.openaccess.OpenAccessDriver") \
.load()

display(df)

except Exception as e:
raise e

0 REPLIES 0

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local communityโ€”sign up today to get started!

Sign Up Now