apache / apache/ossie

Add Snowflake → OSI import converter (snowflake_to_osi)

Open
#162 1 comment 0 reactions 1 assignee Claimed by @sudulakuntanithin View on GitHub
Dominant language
Python
Stars
2.1k
Forks
267
Avg merge
4d 20h
Merged PRs (30d)
24

Description

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](https://docs.snowflake.com/en/user-guide/views-semantic/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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.