Skip to content

Commit f002454

Browse files
committed
Revert changes to cdc
1 parent 1df2f35 commit f002454

File tree

1 file changed

+4
-5
lines changed
  • py/server/deephaven/stream/kafka

1 file changed

+4
-5
lines changed

py/server/deephaven/stream/kafka/cdc.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def consume_raw(
7474
kafka_config: dict,
7575
cdc_spec: CDCSpec,
7676
partitions=None,
77-
table_type: TableType = None,
77+
table_type: TableType = TableType.stream(),
7878
) -> Table:
7979
""" Consume the raw events from a Change Data Capture (CDC) Kafka stream to a Deephaven table.
8080
@@ -85,7 +85,7 @@ def consume_raw(
8585
and/or value Avro necessary schemas are stored.
8686
cdc_spec (CDCSpec): a CDCSpec obtained from calling either the cdc_long_spec or the cdc_short_spec function
8787
partitions (List[int]): a list of integer partition numbers, default is None indicating all partitions
88-
table_type (TableType): a TableType, default is None, meaning to use TableType.blink()
88+
table_type (TableType): a TableType enum, default is TableType.stream()
8989
9090
Returns:
9191
a Deephaven live table for the raw CDC events
@@ -96,9 +96,8 @@ def consume_raw(
9696
try:
9797
partitions = j_partitions(partitions)
9898
kafka_config = j_properties(kafka_config)
99-
if table_type is None:
100-
table_type = TableType.blink()
101-
return Table(j_table=_JCdcTools.consumeRawToTable(kafka_config, cdc_spec.j_object, partitions, table_type.j_object))
99+
table_type_enum = table_type.value
100+
return Table(j_table=_JCdcTools.consumeRawToTable(kafka_config, cdc_spec.j_object, partitions, table_type_enum))
102101
except Exception as e:
103102
raise DHError(e, "failed to consume a raw CDC stream.") from e
104103

0 commit comments

Comments
 (0)