Skip to main content

kafka_source_details

Function kafka_source_details 

Source
pub fn kafka_source_details(a: &str) -> Result<Value, String>
Expand description

Extracts kafka source configuration (topic, group id prefix, connection id) from a catalog create_sql. Returns:

  • jsonb {"topic": <text>, "group_id_prefix": <text | null>, "connection_id": <text>} for CREATE SOURCE ... FROM KAFKA CONNECTION ... (TOPIC = ..., [GROUP ID PREFIX = ...]) statements.
  • jsonb null for any other statement.

Errors if the statement fails to parse, is a kafka source without a TOPIC option, or references an unresolved connection name (i.e. one that hasn’t been through purification).