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: 

How to query a MySQL Table from Databricks?

Swapnil1998
New Contributor III

I wanted to query a MySQL Table using Databricks rather than reading the complete data using a dbtable option, which will help in incremental loads.

remote_table = (spark.read

 .format("jdbc")

 .option("driver", driver)

 .option("url", URL)

 .option("query", query)

 .option("user", user)

 .option("password", password)

 .load()

)

Kindly let me know if there is some way to pass a query like

SELECT * FROM table_name WHERE last_modified_date > 'yyyy-mm-dd';

Regards,

Swapnil

0 REPLIES 0

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group