[ 
https://issues.apache.org/jira/browse/S2GRAPH-251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16726638#comment-16726638
 ] 

ASF GitHub Bot commented on S2GRAPH-251:
----------------------------------------

GitHub user elric-k opened a pull request:

    https://github.com/apache/incubator-s2graph/pull/194

    [S2GRAPH-251] add jdbc options 

    I simply added 'jdbc' options. 
    
    You can create Spark DataFrame from jdbc storage like below example,
    ```
    "source": [
        {
              "name": "jdbc_storage",
              "inputs": [],
              "type": "jdbc",
              "options": {
                "driver": "com.mysql.jdbc.Driver",
                "url": "jdbc:mysql://localhost:3306/mydb",
                "dbtable": "mytable",
                "user": "user",
                "password": "password",
                "fetchsize": "10"
              }
        }
    ]
    ```
    
    and write from dataframe to jdbc storage.
    ```
    "sink": [
        {
              "name": "jdbc_sink",
              "inputs": [
                "my_dataframe"
              ]
              "type": "jdbc",
              "options": {
                "driver": "com.mysql.jdbc.Driver",
                "url": "jdbc:mysql://localhost:3306/mydb",
                "dbtable": "mytable",
                "user": "user",
                "password": "password",
                "batchsize": "10",
                "mode": "append"
              }
        }
    ]
    ```
    
    Please check the URL below for a list of available options
    https://spark.apache.org/docs/latest/sql-data-sources-jdbc.html

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/elric-k/incubator-s2graph S2GRAPH-251

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-s2graph/pull/194.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #194
    
----
commit 2802837de584515b7776ae786e33ef2d0fe40e3c
Author: Chul Kang <elric@...>
Date:   2018-12-21T10:24:14Z

    [S2GRAPH-251] add jdbc options #251

----


> Provide JdbcSource/Sink
> -----------------------
>
>                 Key: S2GRAPH-251
>                 URL: https://issues.apache.org/jira/browse/S2GRAPH-251
>             Project: S2Graph
>          Issue Type: Sub-task
>          Components: s2jobs
>            Reporter: Chul Kang
>            Assignee: Chul Kang
>            Priority: Minor
>
> I think it would be good if we can provide JDBC options for s2jobs.
> Spark supports read and write data from other databases using JDBC. Using 
> this, we can easily add JDBC options to s2jobs. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to