cdm_data_loaders.converters.facades.pyiceberg_to_jsonschema ¶
Convert Iceberg types and loaded tables through typed readers and emitters.
convert_type ¶
convert_type(
field_type: IcebergType,
*,
extension_registry: ExtensionRegistry = DEFAULT_EXTENSIONS
) -> dict[str, Any]
Read and emit a single Iceberg type.
Source code in src/cdm_data_loaders/converters/facades/pyiceberg_to_jsonschema.py
convert_field ¶
convert_field(
field: NestedField,
*,
extension_registry: ExtensionRegistry = DEFAULT_EXTENSIONS
) -> dict[str, Any]
Read and emit a field with its nullable wrapper and scoped metadata.
Source code in src/cdm_data_loaders/converters/facades/pyiceberg_to_jsonschema.py
convert_struct ¶
convert_struct(
fields: tuple[NestedField, ...],
*,
extension_registry: ExtensionRegistry = DEFAULT_EXTENSIONS
) -> dict[str, Any]
Read and emit a struct without a document envelope.
Source code in src/cdm_data_loaders/converters/facades/pyiceberg_to_jsonschema.py
table_to_json_schema ¶
table_to_json_schema(
table: Table,
identifier: tuple[str, ...],
*,
extension_registry: ExtensionRegistry = DEFAULT_EXTENSIONS,
schema: dict[str, Any] | None = None
) -> dict[str, Any]
Read loaded table metadata and emit a JSON Schema document without I/O.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
table
|
Table
|
Loaded Iceberg table. |
required |
identifier
|
tuple[str, ...]
|
Namespace and table name. |
required |
extension_registry
|
ExtensionRegistry
|
Registry for Iceberg extensions. |
DEFAULT_EXTENSIONS
|
schema
|
dict[str, Any] | None
|
Optional namespace document to add the table's schema into, preserving existing entries. |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
JSON Schema document, or the destination namespace document when |