The converters/snowflake/ directory currently ships only the export direction (osi_to_snowflake_yaml_converter.py). The import direction (Snowflake Cortex Analyst semantic view YAML → OSI) doesn't exist yet, though the roadmap lists bidirectional participant↔OSI converters as a goal.
I'd like to contribute it. I've built a snowflake_to_osi_yaml_converter.py that:
Maps Snowflake tables → OSI datasets, base_table → source, dimensions/time_dimensions/facts → fields, and both table-level and view-level metrics → OSI top-level metrics, validated against the official semantic view YAML spec.
Maps relationships (left_table/right_table, relationship_columns) → OSI from/to/from_columns/to_columns.
Preserves Snowflake-specific settings in custom_extensions to avoid silent data loss, with warnings for unmapped constructs.
Includes a test suite (unit, integration, and a round-trip test through the existing exporter) and output that validates against osi-schema.json including sqlglot SQL validation.
Is anyone already working on this? If not, I'll open a PR. Happy to adjust the mapping approach based on maintainer preferences.
The converters/snowflake/ directory currently ships only the export direction (osi_to_snowflake_yaml_converter.py). The import direction (Snowflake Cortex Analyst semantic view YAML → OSI) doesn't exist yet, though the roadmap lists bidirectional participant↔OSI converters as a goal.
I'd like to contribute it. I've built a snowflake_to_osi_yaml_converter.py that:
Maps Snowflake tables → OSI datasets, base_table → source, dimensions/time_dimensions/facts → fields, and both table-level and view-level metrics → OSI top-level metrics, validated against the official semantic view YAML spec.
Maps relationships (left_table/right_table, relationship_columns) → OSI from/to/from_columns/to_columns.
Preserves Snowflake-specific settings in custom_extensions to avoid silent data loss, with warnings for unmapped constructs.
Includes a test suite (unit, integration, and a round-trip test through the existing exporter) and output that validates against osi-schema.json including sqlglot SQL validation.
Is anyone already working on this? If not, I'll open a PR. Happy to adjust the mapping approach based on maintainer preferences.