Skip to content

Inspection functions in the Tributary DuckDB extension

Function category

Inspection

2 functions

tributary_metadata

Table function Inspection
Signature
tributary_metadata(... := VARCHAR, bootstrap.servers := VARCHAR) → TABLE
Arguments (Named)
Argument bootstrap.servers Type VARCHAR Mode Named Description Comma-separated host:port list of brokers to bootstrap from.
Argument ... Type VARCHAR Mode Named Description Varargs Any other librdkafka configuration name — same surface as tributary_scan_topic.
Returns

A table with the following columns:

Column brokers Type STRUCT[] Description Array of broker descriptors — id, host, port.
Column topics Type STRUCT[] Description Array of topic descriptors — name, error, partitions[]. Each partition includes its leader, replicas, and ISR set.
Description
1 List every topic on a cluster
SELECT unnest(topics).name AS topic_name
FROM tributary_metadata("bootstrap.servers" := 'kafka:9092');
2 Count partitions per topic
SELECT
  t.name                            AS topic,
  array_length(t.partitions)         AS partitions
FROM (
  SELECT unnest(topics) AS t
  FROM tributary_metadata("bootstrap.servers" := 'kafka:9092')
)
ORDER BY partitions DESC;

tributary_version

Scalar function Inspection
Signature
tributary_version() → VARCHAR
Description
1 Print the loaded version
SELECT tributary_version();