converter
converter ¶
Abstract base converter for OSI semantic layer output.
SemanticConverter ¶
Bases: ABC
Abstract base converter for OSI semantic layer.
Converters transform Domo source definitions (DataModelTemplate, ViewDefinition) into OSI-compliant semantic model output.
All conversion is synchronous — operates on pre-loaded data objects.
convert
abstractmethod
¶
convert(source: Any, datasets: dict, **options) -> list
Convert source definition to a list of OsiSemanticModels.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
Any
|
A DataModelTemplate or ViewDefinition |
required |
datasets
|
dict
|
dict mapping datasource_id -> DomoDataset (or None) |
required |
**options
|
Converter-specific options |
{}
|
Returns:
| Type | Description |
|---|---|
list
|
list[OsiSemanticModel] |
Source code in src/crew_dcs/integrations/osi/converter.py
20 21 22 23 24 25 26 27 28 29 30 31 | |
export_to_file
abstractmethod
¶
export_to_file(
output: list, file_path: str, **options
) -> None
Export converted semantic models to file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
output
|
list
|
Result from convert() |
required |
file_path
|
str
|
Destination file path |
required |
**options
|
format="yaml" (default) | "json" |
{}
|
Source code in src/crew_dcs/integrations/osi/converter.py
33 34 35 36 37 38 39 40 41 | |