TimestampParser

class aws_cdk.aws_kinesisfirehose.TimestampParser(*args: Any, **kwargs)

Bases: object

Value class that wraps a Joda Time format string.

Use this with the Hive JSON input format for data record format conversion to parse custom timestamp formats.

ExampleMetadata:

infused

Example:

input_format = firehose.HiveJsonInputFormat(
    timestamp_parsers=[
        firehose.TimestampParser.from_format_string("yyyy-MM-dd"), firehose.TimestampParser.EPOCH_MILLIS
    ]
)

Attributes

EPOCH_MILLIS = <aws_cdk.aws_kinesisfirehose.TimestampParser object>
format

The format string to use in Hive JSON input format configuration.

Static Methods

classmethod from_format_string(format)

Creates a TimestampParser from the given format string.

The format string should be a valid Joda Time pattern string. See Class DateTimeFormat for more details

Parameters:

format (str) – the Joda Time format string.

Return type:

TimestampParser