[
https://issues.apache.org/jira/browse/BEAM-6674?focusedWorklogId=251953&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-251953
]
ASF GitHub Bot logged work on BEAM-6674:
----------------------------------------
Author: ASF GitHub Bot
Created on: 31/May/19 18:28
Start Date: 31/May/19 18:28
Worklog Time Spent: 10m
Work Description: reuvenlax commented on pull request #8725: [BEAM-6674]
Add schema support to JdbcIO read
URL: https://github.com/apache/beam/pull/8725#discussion_r289503686
##########
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:
This shouldn't be limited to just reading Row objects, as any type can have
a schema. So you should be able to have a readWithSchema(Class<T> clazz) and
get back a PCollection<T> (if the SchemaRegistry contains a schema for clazz,
and if that schema matches the one inferred at the source). readRows is still
useful but can be a wrapper around this.
----------------------------------------------------------------
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: 251953)
Time Spent: 50m (was: 40m)
> 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: 50m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)