Skip to content

KafkaStreamingSourceOptions

Source code in docs_src/capo_glue/types/kafka_streaming_source_options.py
class KafkaStreamingSourceOptions(TypedDict, closed=True):
    bootstrap_servers: NotRequired[
        "capo_glue.types.enclosed_in_string_property.EnclosedInStringProperty"
    ]
    """<p>A list of bootstrap server URLs, for example, as <code>b-1.vpc-test-2.o4q88o.c6.kafka.us-east-1.amazonaws.com:9094</code>. This option must be specified in the API call or defined in the table metadata in the Data Catalog.</p>"""
    security_protocol: NotRequired[
        "capo_glue.types.enclosed_in_string_property.EnclosedInStringProperty"
    ]
    """<p>The protocol used to communicate with brokers. The possible values are <code>"SSL"</code> or <code>"PLAINTEXT"</code>.</p>"""
    connection_name: NotRequired[
        "capo_glue.types.enclosed_in_string_property.EnclosedInStringProperty"
    ]
    """<p>The name of the connection.</p>"""
    topic_name: NotRequired[
        "capo_glue.types.enclosed_in_string_property.EnclosedInStringProperty"
    ]
    """<p>The topic name as specified in Apache Kafka. You must specify at least one of <code>"topicName"</code>, <code>"assign"</code> or <code>"subscribePattern"</code>.</p>"""
    assign: NotRequired[
        "capo_glue.types.enclosed_in_string_property.EnclosedInStringProperty"
    ]
    """<p>The specific <code>TopicPartitions</code> to consume. You must specify at least one of <code>"topicName"</code>, <code>"assign"</code> or <code>"subscribePattern"</code>.</p>"""
    subscribe_pattern: NotRequired[
        "capo_glue.types.enclosed_in_string_property.EnclosedInStringProperty"
    ]
    """<p>A Java regex string that identifies the topic list to subscribe to. You must specify at least one of <code>"topicName"</code>, <code>"assign"</code> or <code>"subscribePattern"</code>.</p>"""
    classification: NotRequired[
        "capo_glue.types.enclosed_in_string_property.EnclosedInStringProperty"
    ]
    """<p>An optional classification.</p>"""
    delimiter: NotRequired[
        "capo_glue.types.enclosed_in_string_property.EnclosedInStringProperty"
    ]
    """<p>Specifies the delimiter character.</p>"""
    starting_offsets: NotRequired[
        "capo_glue.types.enclosed_in_string_property.EnclosedInStringProperty"
    ]
    """<p>The starting position in the Kafka topic to read data from. The possible values are <code>"earliest"</code> or <code>"latest"</code>. The default value is <code>"latest"</code>.</p>"""
    ending_offsets: NotRequired[
        "capo_glue.types.enclosed_in_string_property.EnclosedInStringProperty"
    ]
    """<p>The end point when a batch query is ended. Possible values are either <code>"latest"</code> or a JSON string that specifies an ending offset for each <code>TopicPartition</code>.</p>"""
    poll_timeout_ms: NotRequired[
        "capo_glue.types.boxed_non_negative_long.BoxedNonNegativeLong"
    ]
    """<p>The timeout in milliseconds to poll data from Kafka in Spark job executors. The default value is <code>512</code>.</p>"""
    num_retries: NotRequired[
        "capo_glue.types.boxed_non_negative_int.BoxedNonNegativeInt"
    ]
    """<p>The number of times to retry before failing to fetch Kafka offsets. The default value is <code>3</code>.</p>"""
    retry_interval_ms: NotRequired[
        "capo_glue.types.boxed_non_negative_long.BoxedNonNegativeLong"
    ]
    """<p>The time in milliseconds to wait before retrying to fetch Kafka offsets. The default value is <code>10</code>.</p>"""
    max_offsets_per_trigger: NotRequired[
        "capo_glue.types.boxed_non_negative_long.BoxedNonNegativeLong"
    ]
    """<p>The rate limit on the maximum number of offsets that are processed per trigger interval. The specified total number of offsets is proportionally split across <code>topicPartitions</code> of different volumes. The default value is null, which means that the consumer reads all offsets until the known latest offset.</p>"""
    min_partitions: NotRequired[
        "capo_glue.types.boxed_non_negative_int.BoxedNonNegativeInt"
    ]
    """<p>The desired minimum number of partitions to read from Kafka. The default value is null, which means that the number of spark partitions is equal to the number of Kafka partitions.</p>"""
    include_headers: NotRequired["capo_glue.types.boxed_boolean.BoxedBoolean"]
    """<p>Whether to include the Kafka headers. When the option is set to "true", the data output will contain an additional column named "glue_streaming_kafka_headers" with type <code>Array[Struct(key: String, value: String)]</code>. The default value is "false". This option is available in Glue version 3.0 or later only.</p>"""
    add_record_timestamp: NotRequired[
        "capo_glue.types.enclosed_in_string_property.EnclosedInStringProperty"
    ]
    """<p>When this option is set to 'true', the data output will contain an additional column named "__src_timestamp" that indicates the time when the corresponding record received by the topic. The default value is 'false'. This option is supported in Glue version 4.0 or later.</p>"""
    emit_consumer_lag_metrics: NotRequired[
        "capo_glue.types.enclosed_in_string_property.EnclosedInStringProperty"
    ]
    """<p>When this option is set to 'true', for each batch, it will emit the metrics for the duration between the oldest record received by the topic and the time it arrives in Glue to CloudWatch. The metric's name is "glue.driver.streaming.maxConsumerLagInMs". The default value is 'false'. This option is supported in Glue version 4.0 or later.</p>"""
    starting_timestamp: NotRequired["capo_glue.types.iso8601_date_time.Iso8601DateTime"]
    """<p>The timestamp of the record in the Kafka topic to start reading data from. The possible values are a timestamp string in UTC format of the pattern <code>yyyy-mm-ddTHH:MM:SSZ</code> (where Z represents a UTC timezone offset with a +/-. For example: "2023-04-04T08:00:00+08:00"). </p> <p>Only one of <code>StartingTimestamp</code> or <code>StartingOffsets</code> must be set.</p>"""

add_record_timestamp instance-attribute

add_record_timestamp: NotRequired[EnclosedInStringProperty]

When this option is set to 'true', the data output will contain an additional column named "__src_timestamp" that indicates the time when the corresponding record received by the topic. The default value is 'false'. This option is supported in Glue version 4.0 or later.

assign instance-attribute

assign: NotRequired[EnclosedInStringProperty]

The specific TopicPartitions to consume. You must specify at least one of "topicName", "assign" or "subscribePattern".

bootstrap_servers instance-attribute

bootstrap_servers: NotRequired[EnclosedInStringProperty]

A list of bootstrap server URLs, for example, as b-1.vpc-test-2.o4q88o.c6.kafka.us-east-1.amazonaws.com:9094. This option must be specified in the API call or defined in the table metadata in the Data Catalog.

classification instance-attribute

classification: NotRequired[EnclosedInStringProperty]

An optional classification.

connection_name instance-attribute

connection_name: NotRequired[EnclosedInStringProperty]

The name of the connection.

delimiter instance-attribute

delimiter: NotRequired[EnclosedInStringProperty]

Specifies the delimiter character.

emit_consumer_lag_metrics instance-attribute

emit_consumer_lag_metrics: NotRequired[EnclosedInStringProperty]

When this option is set to 'true', for each batch, it will emit the metrics for the duration between the oldest record received by the topic and the time it arrives in Glue to CloudWatch. The metric's name is "glue.driver.streaming.maxConsumerLagInMs". The default value is 'false'. This option is supported in Glue version 4.0 or later.

ending_offsets instance-attribute

ending_offsets: NotRequired[EnclosedInStringProperty]

The end point when a batch query is ended. Possible values are either "latest" or a JSON string that specifies an ending offset for each TopicPartition.

include_headers instance-attribute

include_headers: NotRequired[BoxedBoolean]

Whether to include the Kafka headers. When the option is set to "true", the data output will contain an additional column named "glue_streaming_kafka_headers" with type Array[Struct(key: String, value: String)]. The default value is "false". This option is available in Glue version 3.0 or later only.

max_offsets_per_trigger instance-attribute

max_offsets_per_trigger: NotRequired[BoxedNonNegativeLong]

The rate limit on the maximum number of offsets that are processed per trigger interval. The specified total number of offsets is proportionally split across topicPartitions of different volumes. The default value is null, which means that the consumer reads all offsets until the known latest offset.

min_partitions instance-attribute

min_partitions: NotRequired[BoxedNonNegativeInt]

The desired minimum number of partitions to read from Kafka. The default value is null, which means that the number of spark partitions is equal to the number of Kafka partitions.

num_retries instance-attribute

num_retries: NotRequired[BoxedNonNegativeInt]

The number of times to retry before failing to fetch Kafka offsets. The default value is 3.

poll_timeout_ms instance-attribute

poll_timeout_ms: NotRequired[BoxedNonNegativeLong]

The timeout in milliseconds to poll data from Kafka in Spark job executors. The default value is 512.

retry_interval_ms instance-attribute

retry_interval_ms: NotRequired[BoxedNonNegativeLong]

The time in milliseconds to wait before retrying to fetch Kafka offsets. The default value is 10.

security_protocol instance-attribute

security_protocol: NotRequired[EnclosedInStringProperty]

The protocol used to communicate with brokers. The possible values are "SSL" or "PLAINTEXT".

starting_offsets instance-attribute

starting_offsets: NotRequired[EnclosedInStringProperty]

The starting position in the Kafka topic to read data from. The possible values are "earliest" or "latest". The default value is "latest".

starting_timestamp instance-attribute

starting_timestamp: NotRequired[Iso8601DateTime]

The timestamp of the record in the Kafka topic to start reading data from. The possible values are a timestamp string in UTC format of the pattern yyyy-mm-ddTHH:MM:SSZ (where Z represents a UTC timezone offset with a +/-. For example: "2023-04-04T08:00:00+08:00").

Only one of StartingTimestamp or StartingOffsets must be set.

subscribe_pattern instance-attribute

subscribe_pattern: NotRequired[EnclosedInStringProperty]

A Java regex string that identifies the topic list to subscribe to. You must specify at least one of "topicName", "assign" or "subscribePattern".

topic_name instance-attribute

topic_name: NotRequired[EnclosedInStringProperty]

The topic name as specified in Apache Kafka. You must specify at least one of "topicName", "assign" or "subscribePattern".