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

enhance the jdbc datasource to support multiple table query #153

Merged
merged 2 commits into from
Aug 10, 2023

Conversation

Nicole00
Copy link
Contributor

@Nicole00 Nicole00 commented Aug 7, 2023

Enhance the data reading capabilities of relational databases:

  1. support single-table scanning, and also support multi-table queries.
  2. For nebula-exchange_spark_2.2, since the jdbc datasource only allows reading of a single table, and does not allow querying from the database, we support to query the single table in SparkSQL and still does not support multiple tables query.

for nebula-exchange_spark_2.2, the jdbc config should be:

      url:"jdbc:mysql://127.0.0.1:3306/test"
      driver: "com.mysql.cj.jdbc.Driver"
      user: "nebula"
      password: "Nebula@123"
      table: "test.people"
      sentence: "select * from  people" #sentence config is optional. the table name in sentence must just be table, not db.name

the mysql/oracle/postgresql config shoud just config table, do not support sentence.

for nebula-exchange_spark_2.4 or 3.0, the jdbc config should be:

      url:"jdbc:mysql://127.0.0.1:3306/test"
      driver: "com.mysql.cj.jdbc.Driver"
      user: "nebula"
      password: "Nebula@123"
      table: "test.people"
      # sentence and table cannot config together.
      # sentence: "select * from  people, player, team"

the same for mysql/oracle/postgresql as jdbc.

@Nicole00 Nicole00 added the doc affected PR: improvements or additions to documentation label Aug 7, 2023
@codecov-commenter
Copy link

Codecov Report

Patch coverage: 15.78% and project coverage change: -0.23% ⚠️

Comparison is base (1f40692) 56.01% compared to head (4eaca63) 55.78%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #153      +/-   ##
============================================
- Coverage     56.01%   55.78%   -0.23%     
  Complexity       83       83              
============================================
  Files            18       18              
  Lines          1655     1667      +12     
  Branches        315      326      +11     
============================================
+ Hits            927      930       +3     
- Misses          556      559       +3     
- Partials        172      178       +6     
Files Changed Coverage Δ
.../vesoft/exchange/common/config/SourceConfigs.scala 49.71% <12.00%> (-4.19%) ⬇️
...la/com/vesoft/exchange/common/config/Configs.scala 63.78% <23.07%> (+0.66%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Nicole00 Nicole00 requested review from wey-gu and xiajingchun August 9, 2023 07:19
@Nicole00 Nicole00 merged commit 8a3a127 into vesoft-inc:master Aug 10, 2023
@Nicole00 Nicole00 deleted the jdbc branch August 10, 2023 01:53
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.

3 participants