Help Center/
Data Lake Insight/
FAQs/
Problems Related to Spark Jobs/
Job Development/
How Does a Spark Job Access a MySQL Database?
Updated on 2023-08-03 GMT+08:00
How Does a Spark Job Access a MySQL Database?
You can use DLI Spark jobs to access data in the MySQL database using either of the following methods:
- Solution 1: Buy a yearly/monthly or pay-per-use dedicated queue, create an enhanced datasource connection, and read data from the MySQL database through a datasource table. You need to write Java or Scala code to implement this solution.
- Solution 2: Use CDM to import data from the MySQL database to an OBS bucket, and then use a Spark job to read data from the OBS bucket. If you already have a CDM cluster, this solution is simpler than solution 1 and does not involve any other database.
Parent topic: Job Development
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.
The system is busy. Please try again later.