Expand description
Shared utilities for ODCS and ODCL parsing.
This module contains common types, utility functions, and parsing helpers used by both the ODCS (Open Data Contract Standard) and ODCL (legacy Data Contract) importers. Separating these shared components allows for cleaner code organization and easier testing.
Structs§
- Parser
Error - Parser error structure for detailed error reporting.
Functions§
- column_
to_ column_ data - Convert a Column to ColumnData, preserving all ODCS v3.1.0 fields. This is used when importers create Column objects internally and need to return ColumnData in the ImportResult.
- expand_
nested_ column - Expand a nested column from a schema definition, creating columns with dot notation.
- extract_
catalog_ schema - Extract catalog and schema from customProperties.
- extract_
metadata_ from_ custom_ properties - Extract metadata from customProperties in ODCS/ODCL format.
- extract_
quality_ from_ obj - Extract quality rules from a JSON object.
- extract_
shared_ domains - Extract sharedDomains from customProperties.
- json_
value_ to_ serde_ value - Convert JSON Value to serde_json::Value for storage in HashMap.
- normalize_
data_ type - Normalize data type to uppercase, preserving STRUCT<…>, ARRAY<…>, MAP<…> format.
- parse_
data_ vault_ classification - Parse Data Vault classification from string.
- parse_
field_ definition - Parse a single field definition (e.g., “ID: STRING” or “DETAILS: STRUCT<…>”).
- parse_
foreign_ key - Parse foreign key from JSON value.
- parse_
foreign_ key_ from_ data_ contract - Parse foreign key from Data Contract field data.
- parse_
medallion_ layer - Parse medallion layer from string.
- parse_
scd_ pattern - Parse SCD pattern from string.
- parse_
struct_ fields_ from_ string - Parse STRUCT fields from string (e.g., “ID: STRING, NAME: STRING”).
- resolve_
ref - Resolve a $ref reference like ‘#/definitions/orderAction’.
- yaml_
to_ json_ value - Convert YAML Value to JSON Value for easier manipulation.