Class OpenXJsonInputFormat.Builder
java.lang.Object
software.amazon.awscdk.services.kinesisfirehose.OpenXJsonInputFormat.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<OpenXJsonInputFormat>
- Enclosing class:
OpenXJsonInputFormat
@Stability(Stable)
public static final class OpenXJsonInputFormat.Builder
extends Object
implements software.amazon.jsii.Builder<OpenXJsonInputFormat>
A fluent builder for
OpenXJsonInputFormat.-
Method Summary
Modifier and TypeMethodDescriptionbuild()columnToJsonKeyMappings(Map<String, String> columnToJsonKeyMappings) Maps column names to JSON keys that aren't identical to the column names.convertDotsInJsonKeysToUnderscores(Boolean convertDotsInJsonKeysToUnderscores) When set totrue, specifies that the names of the keys include dots and that you want Firehose to replace them with underscores.static OpenXJsonInputFormat.Buildercreate()lowercaseColumnNames(Boolean lowercaseColumnNames) Whether the JSON keys should be lowercased when written as column names.
-
Method Details
-
create
- Returns:
- a new instance of
OpenXJsonInputFormat.Builder.
-
columnToJsonKeyMappings
@Stability(Stable) public OpenXJsonInputFormat.Builder columnToJsonKeyMappings(Map<String, String> columnToJsonKeyMappings) Maps column names to JSON keys that aren't identical to the column names.This is useful when the JSON contains keys that are Hive keywords. For example,
timestampis a Hive keyword. If you have a JSON key namedtimestamp, set this parameter to{"ts": "timestamp"}to map this key to a column namedtsDefault: JSON keys are not renamed
- Parameters:
columnToJsonKeyMappings- Maps column names to JSON keys that aren't identical to the column names. This parameter is required.- Returns:
this
-
convertDotsInJsonKeysToUnderscores
@Stability(Stable) public OpenXJsonInputFormat.Builder convertDotsInJsonKeysToUnderscores(Boolean convertDotsInJsonKeysToUnderscores) When set totrue, specifies that the names of the keys include dots and that you want Firehose to replace them with underscores.This is useful because Apache Hive does not allow dots in column names. For example, if the JSON contains a key whose name is "a.b", you can define the column name to be "a_b" when using this option.
Default: `false`
- Parameters:
convertDotsInJsonKeysToUnderscores- When set totrue, specifies that the names of the keys include dots and that you want Firehose to replace them with underscores. This parameter is required.- Returns:
this
-
lowercaseColumnNames
@Stability(Stable) public OpenXJsonInputFormat.Builder lowercaseColumnNames(Boolean lowercaseColumnNames) Whether the JSON keys should be lowercased when written as column names.Default: `true`
- Parameters:
lowercaseColumnNames- Whether the JSON keys should be lowercased when written as column names. This parameter is required.- Returns:
this
-
build
- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<OpenXJsonInputFormat>- Returns:
- a newly built instance of
OpenXJsonInputFormat.
-