Skip to content

Add Snowflake → OSI import converter (snowflake_to_osi) #162

Description

@sudulakuntanithin

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.

Activity

  1. RyutoYoda commented on Aug 10, 2026

    @RyutoYoda
    Contributor

    I've got a small importer that works from a live view rather than the YAML: it reads DESCRIBE SEMANTIC VIEW output (the table/dimension/fact/metric rows) and emits an OSI model. That's a different input path from #163, which parses the Cortex Analyst YAML file.

    Before I open anything — would a DESCRIBE-based import be useful as a complement to #163, or would you rather keep one importer and get #163 landed first? I can send the DESCRIBE variant as a separate PR, or help review #163 instead, whichever is more useful.

  2. added a commit that references this issue on Oct 11, 2026
    b5effe0
  3. added 4 commits that reference this issue on Oct 12, 2026
    615532b
    56791c8
    b5e24f5
    97fa73c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions