Skip to content

Commit

Permalink
Reorder Java schema instead
Browse files Browse the repository at this point in the history
  • Loading branch information
damondouglas committed Dec 5, 2024
1 parent 2e030c0 commit 6b3c7ee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ public Schema configurationSchema() {
.addNullableField("disableAutoCommit", FieldType.BOOLEAN)
.addNullableField("outputParallelization", FieldType.BOOLEAN)
.addNullableField("autosharding", FieldType.BOOLEAN)
.addNullableField("writeBatchSize", FieldType.INT64)
// Partitioning support. If you specify a partition column we will use that instead of
// readQuery
.addNullableField("partitionColumn", FieldType.STRING)
.addNullableField("partitions", FieldType.INT16)
.addNullableField("maxConnections", FieldType.INT16)
.addNullableField("driverJars", FieldType.STRING)
.addNullableField("writeBatchSize", FieldType.INT64)
.build();
}

Expand Down
11 changes: 7 additions & 4 deletions sdks/python/apache_beam/io/jdbc.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,20 +119,23 @@ def default_io_expansion_service(classpath=None):

Config = typing.NamedTuple(
'Config',
[('driver_class_name', str), ('jdbc_url', str), ('username', str),
('password', str), ('connection_properties', typing.Optional[str]),
[('driver_class_name', str),
('jdbc_url', str),
('username', str),
('password', str),
('connection_properties', typing.Optional[str]),
('connection_init_sqls', typing.Optional[typing.List[str]]),
('read_query', typing.Optional[str]),
('write_statement', typing.Optional[str]),
('fetch_size', typing.Optional[np.int16]),
('disable_autocommit', typing.Optional[bool]),
('output_parallelization', typing.Optional[bool]),
('autosharding', typing.Optional[bool]),
('write_batch_size', typing.Optional[np.int64]),
('partition_column', typing.Optional[str]),
('partitions', typing.Optional[np.int16]),
('max_connections', typing.Optional[np.int16]),
('driver_jars', typing.Optional[str])],
('driver_jars', typing.Optional[str]),
('write_batch_size', typing.Optional[np.int64])],
)

DEFAULT_JDBC_CLASSPATH = ['org.postgresql:postgresql:42.2.16']
Expand Down

0 comments on commit 6b3c7ee

Please sign in to comment.