-
Notifications
You must be signed in to change notification settings - Fork 4.6k
SQL DDL documentation #37539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
SQL DDL documentation #37539
Changes from all commits
b52c85f
092ea3e
257cd5a
0d6ea98
aa5d701
5ff507c
936aa38
ca726e5
2c8eb94
4546446
9451dde
24c459c
2e4a3a3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,7 @@ | |
|
|
||
| import static org.apache.beam.sdk.util.Preconditions.checkStateNotNull; | ||
|
|
||
| import com.fasterxml.jackson.databind.JsonNode; | ||
| import com.fasterxml.jackson.databind.node.ObjectNode; | ||
| import java.util.HashMap; | ||
| import java.util.List; | ||
|
|
@@ -56,6 +57,8 @@ class IcebergTable extends SchemaBaseBeamTable { | |
| @VisibleForTesting static final String CATALOG_PROPERTIES_FIELD = "catalog_properties"; | ||
| @VisibleForTesting static final String HADOOP_CONFIG_PROPERTIES_FIELD = "config_properties"; | ||
| @VisibleForTesting static final String CATALOG_NAME_FIELD = "catalog_name"; | ||
| static final String BEAM_WRITE_PROPERTY = "beam.write."; | ||
| static final String BEAM_READ_PROPERTY = "beam.read."; | ||
|
|
||
| @VisibleForTesting | ||
| static final String TRIGGERING_FREQUENCY_FIELD = "triggering_frequency_seconds"; | ||
|
|
@@ -71,9 +74,21 @@ class IcebergTable extends SchemaBaseBeamTable { | |
| this.tableIdentifier = tableIdentifier; | ||
| this.catalogConfig = catalogConfig; | ||
| ObjectNode properties = table.getProperties(); | ||
| if (properties.has(TRIGGERING_FREQUENCY_FIELD)) { | ||
| this.triggeringFrequency = properties.get(TRIGGERING_FREQUENCY_FIELD).asInt(); | ||
| for (Map.Entry<String, JsonNode> property : properties.properties()) { | ||
| String name = property.getKey().toLowerCase(); | ||
| if (name.startsWith(BEAM_WRITE_PROPERTY)) { | ||
| String prop = name.substring(BEAM_WRITE_PROPERTY.length()); | ||
| if (prop.equalsIgnoreCase(TRIGGERING_FREQUENCY_FIELD)) { | ||
| this.triggeringFrequency = property.getValue().asInt(); | ||
| } else { | ||
| throw new IllegalArgumentException("Unknown Beam write property: " + name); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it be preferred to warn here (for future forward and backward compatibility)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd rather fail and avoid a situation where the transform is behaving unexpectedly. I remember running into user issues with some IOs for the same reason, where incorrect configurations were logged but the pipeline kept running. |
||
| } | ||
| } else if (name.startsWith(BEAM_READ_PROPERTY)) { | ||
| // none supported yet | ||
| throw new IllegalArgumentException("Unknown Beam read property: " + name); | ||
| } | ||
| } | ||
|
|
||
| this.partitionFields = table.getPartitionFields(); | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.