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 Details

    • create

      @Stability(Stable) public static OpenXJsonInputFormat.Builder 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, timestamp is a Hive keyword. If you have a JSON key named timestamp, set this parameter to {"ts": "timestamp"} to map this key to a column named ts

      Default: 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 to true, 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 to true, 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

      @Stability(Stable) public OpenXJsonInputFormat build()
      Specified by:
      build in interface software.amazon.jsii.Builder<OpenXJsonInputFormat>
      Returns:
      a newly built instance of OpenXJsonInputFormat.