DruidDest
class DruidDest(
tables: DruidTableNamesSpec,
if_table_exists: IfTableExistsSpec = 'append',
time_column: str | None = None,
segment_granularity: SegmentGranularitySpec = 'ALL',
max_concurrent_subtasks: int = 1,
max_rows_per_segment: int = 5000000,
max_rows_in_memory: int = 1000000,
http_timeout_sec: int = 300,
dest_cfg: DestCfgSpec | None = None,
)
Bases: Dest
Categories: destination
Druid destination for @subscriber -- one slot per
datasource.
Examples
Overwrite the datasource on every run instead of appending:
@subscriber(
destination=DruidDest(tables=["events"], if_table_exists="replace"),
input_tables=["mycoll/events"],
)
def publish(events: TableFrameSpec) -> TableFrameSpec:
return events
Parameters
tablesDruidTableNamesSpec (list[str])Datasource names, one write slot per entry (each 1-128
chars, not starting with . or _, and containing no
/, backslash or NUL).
if_table_existsIfTableExistsSpec (Literal['append', 'replace'])"append" (default) or "replace"
(overwrite the datasource).
time_columnstr | NoneName of the row-level timestamp column Druid uses
as its primary __time field at ingest. Druid requires a
time column on every datasource; if the rows carry none,
leave unset and the ingestion spec falls back to the
current ingest time.
segment_granularitySegmentGranularitySpec (Literal['ALL', 'NONE', 'SECOND', 'MINUTE', 'FIFTEEN_MINUTE', 'THIRTY_MINUTE', 'HOUR', 'SIX_HOUR', 'DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR'])Druid segment grain -- one of ALL
(default), NONE, SECOND, MINUTE,
FIFTEEN_MINUTE, THIRTY_MINUTE, HOUR,
SIX_HOUR, DAY, WEEK, MONTH, QUARTER or
YEAR.
dest_cfgDestCfgSpec | None (Mapping[Literal['druid.logging_level', 'druid.poll_interval_seconds', 'druid.retry_attempts', 'druid.retry_backoff_seconds'], Any] | None)Optional connector config over the keys
druid.logging_level, druid.poll_interval_seconds,
druid.retry_attempts and
druid.retry_backoff_seconds.