Skip to main content

Module discover

Module discover 

Source
Expand description

Live source introspection (faucet discover, #211).

A Source that can enumerate the datasets living behind its connection (tables in a database schema, collections in MongoDB, indices in Elasticsearch, key prefixes in an object store) overrides Source::discover to return one DatasetDescriptor per dataset. The CLI turns that list into a ready-to-run config: one matrix row per dataset, each row deep-merging the descriptor’s config_patch over the connection config.

Structs§

DatasetDescriptor
One dataset discovered behind a source’s connection.

Functions§

columns_to_schema
Assemble an infer_schema-shaped object schema from (column_name, type_fragment) pairs, preserving input order semantics (serde_json map ordering applies).
nullable_type
Wrap a type fragment as nullable ({"type": ["T", "null"]}), matching the nullable shape infer_schema emits.
sql_type_to_json_schema
Map a SQL catalog type name (as reported by information_schema.columns or an equivalent) to a JSON-Schema type fragment matching the shape infer_schema produces.