Skip to content

OpenXJsonSerDe

Source code in docs_src/capo_firehose/types/open_x_json_ser_de.py
class OpenXJsonSerDe(TypedDict, closed=True):
    convert_dots_in_json_keys_to_underscores: NotRequired[
        "capo_firehose.types.boolean_object.BooleanObject"
    ]
    """<p>When set to <code>true</code>, 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.</p> <p>The default is <code>false</code>.</p>"""
    case_insensitive: NotRequired["capo_firehose.types.boolean_object.BooleanObject"]
    """<p>When set to <code>true</code>, which is the default, Firehose converts JSON keys to lowercase before deserializing them.</p>"""
    column_to_json_key_mappings: NotRequired[
        "capo_firehose.types.column_to_json_key_mappings.ColumnToJsonKeyMappings"
    ]
    """<p>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, <code>timestamp</code> is a Hive keyword. If you have a JSON key named <code>timestamp</code>, set this parameter to <code>{"ts": "timestamp"}</code> to map this key to a column named <code>ts</code>.</p>"""

case_insensitive instance-attribute

case_insensitive: NotRequired[BooleanObject]

When set to true, which is the default, Firehose converts JSON keys to lowercase before deserializing them.

column_to_json_key_mappings instance-attribute

column_to_json_key_mappings: NotRequired[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.

convert_dots_in_json_keys_to_underscores instance-attribute

convert_dots_in_json_keys_to_underscores: NotRequired[BooleanObject]

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.

The default is false.