Skip to content

Commit 5458a46

Browse files
committed
[IcebergIO]Create tables with Iceberg Table properties
1 parent be65ca9 commit 5458a46

File tree

2 files changed

+12
-23
lines changed

2 files changed

+12
-23
lines changed

sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/IcebergCatalogConfig.java

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -84,26 +84,17 @@ public org.apache.iceberg.catalog.Catalog catalog() {
8484
}
8585

8686
public void createTable(
87-
String tableIdentifier,
88-
Schema tableSchema,
89-
@Nullable List<String> partitionFields,
90-
@Nullable Map<String, String> tableProperties) {
87+
String tableIdentifier, Schema tableSchema, @Nullable List<String> partitionFields) {
9188
TableIdentifier icebergIdentifier = TableIdentifier.parse(tableIdentifier);
9289
org.apache.iceberg.Schema icebergSchema = IcebergUtils.beamSchemaToIcebergSchema(tableSchema);
9390
PartitionSpec icebergSpec = PartitionUtils.toPartitionSpec(partitionFields, tableSchema);
9491
try {
95-
catalog()
96-
.createTable(
97-
icebergIdentifier,
98-
icebergSchema,
99-
icebergSpec,
100-
tableProperties == null ? Maps.newHashMap() : tableProperties);
92+
catalog().createTable(icebergIdentifier, icebergSchema, icebergSpec);
10193
LOG.info(
102-
"Created table '{}' with schema: {}\n, partition spec: {}, table properties: {}",
94+
"Created table '{}' with schema: {}\n, partition spec: {}",
10395
icebergIdentifier,
10496
icebergSchema,
105-
icebergSpec,
106-
tableProperties);
97+
icebergSpec);
10798
} catch (AlreadyExistsException e) {
10899
throw new TableAlreadyExistsException(e);
109100
}

website/www/site/content/en/documentation/io/managed-io.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,8 @@ and Beam SQL is invoked via the Managed API under the hood.
9797
keep (<code>list[<span style="color: green;">str</span>]</code>)<br>
9898
only (<code style="color: green">str</code>)<br>
9999
partition_fields (<code>list[<span style="color: green;">str</span>]</code>)<br>
100+
table_properties (<code>map[<span style="color: green;">str</span>, <span style="color: green;">str</span>]</code>)<br>
100101
triggering_frequency_seconds (<code style="color: #f54251">int32</code>)<br>
101-
table_properties (<code>map[<span style="color: green;">str</span>, <span style="color: green;
102-
">str</span>]</code>)<br>
103102
</td>
104103
</tr>
105104
<tr>
@@ -424,26 +423,25 @@ For more information on partition transforms, please visit https://iceberg.apach
424423
</tr>
425424
<tr>
426425
<td>
427-
triggering_frequency_seconds
426+
table_properties
428427
</td>
429428
<td>
430-
<code style="color: #f54251">int32</code>
429+
<code>map[<span style="color: green;">str</span>, <span style="color: green;">str</span>]</code>
431430
</td>
432431
<td>
433-
For a streaming pipeline, sets the frequency at which snapshots are produced.
432+
Iceberg table properties to be set on the table when it is created.
433+
For more information on table properties, please visit https://iceberg.apache.org/docs/latest/configuration/#table-properties.
434434
</td>
435435
</tr>
436436
<tr>
437437
<td>
438-
table_properties
438+
triggering_frequency_seconds
439439
</td>
440440
<td>
441-
<code>map[<span style="color: green;">str</span>, <span style="color: green;">str</span>]</code>
441+
<code style="color: #f54251">int32</code>
442442
</td>
443443
<td>
444-
Table Properties set while creating Iceberg Table.
445-
446-
For more information on table properties, please visit https://iceberg.apache.org/docs/latest/configuration/#table-properties
444+
For a streaming pipeline, sets the frequency at which snapshots are produced.
447445
</td>
448446
</tr>
449447
</table>

0 commit comments

Comments
 (0)