[ 
https://issues.apache.org/jira/browse/BEAM-6674?focusedWorklogId=252833&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-252833
 ]

ASF GitHub Bot logged work on BEAM-6674:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 02/Jun/19 10:51
            Start Date: 02/Jun/19 10:51
    Worklog Time Spent: 10m 
      Work Description: charithe commented on pull request #8725: [BEAM-6674] 
Add schema support to JdbcIO read
URL: https://github.com/apache/beam/pull/8725#discussion_r289636876
 
 

 ##########
 File path: 
sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java
 ##########
 @@ -188,6 +191,15 @@
         .build();
   }
 
+  /** Read Beam {@link Row}s from a JDBC data source. */
+  @Experimental(Experimental.Kind.SCHEMAS)
+  public static ReadRows readRows() {
+    return new AutoValue_JdbcIO_ReadRows.Builder()
+        .setFetchSize(DEFAULT_FETCH_SIZE)
+        .setOutputParallelization(true)
+        .build();
+  }
 
 Review comment:
   Do you prefer an explicit `readWithSchema` method or do you prefer it to be 
implicit?. That is:
   
   - Make the JDBC row mapper optional
   - If the user provides a JDBC row mapper, then:
       - If the output type of the row mapper exists in the registry, attach 
that schema to the output PCollection
       - Otherwise, the output PCollection will not have a schema
   - If the user does not provide a JDBC row mapper, then:
       - If the output type exists in the schema registry and is compatible 
with the inferred schema from the database, generate our own row mapper to map 
the resultset and attach the schema to the output PCollection
       - Otherwise, throw an exception
   
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 252833)
    Time Spent: 1h 20m  (was: 1h 10m)

> The JdbcIO source should produce schemas
> ----------------------------------------
>
>                 Key: BEAM-6674
>                 URL: https://issues.apache.org/jira/browse/BEAM-6674
>             Project: Beam
>          Issue Type: Sub-task
>          Components: io-java-jdbc
>            Reporter: Reuven Lax
>            Assignee: Shehzaad Nakhoda
>            Priority: Major
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>




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

Reply via email to