Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support general jdbc datasource #96

Merged
merged 1 commit into from
Sep 11, 2022
Merged

Conversation

Nicole00
Copy link
Contributor

@Nicole00 Nicole00 commented Sep 8, 2022

close #94

@Nicole00
Copy link
Contributor Author

Nicole00 commented Sep 9, 2022

tested using mysql.
for mysql, the jdbc datasource configs should be:

      url:"jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=utf-8"
      driver:"com.mysql.cj.jdbc.Driver"
      user:root
      password:"12345"
      table:person
      sentence:"select * from person"
      partitionColumn:id    # optional
      lowerBound:1          # optional
      upperBound:5          # optional
      numPartitions:5       # optional
      fetchSize:2           # optional

@Nicole00
Copy link
Contributor Author

Nicole00 commented Sep 9, 2022

When use jdbc to extract data from one database, please make sure that the corresponding driver jar has been located in ${SPARK_HOME}/jars. Or you will get exceptions like "java.lang.ClassNotFoundException: com.mysql.cj.jdbc.Driver"

@wey-gu
Copy link
Contributor

wey-gu commented Sep 9, 2022

Wow, this ideally will bring a bunch of new data sources!

@Nicole00 Nicole00 merged commit 4edf6ce into vesoft-inc:master Sep 11, 2022
@Nicole00 Nicole00 added the doc affected PR: improvements or additions to documentation label Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc affected PR: improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support generic jdbc as data source
3 participants