Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e985426
feat(snowflake): import Cortex Analyst measures and enrichment keys
nicosuave Jun 13, 2026
9124e4b
Auto-update JSON schema
github-actions[bot] Jun 13, 2026
b7f0127
Fix Snowflake top-level metric qualification and round-trip export
nicosuave Jun 14, 2026
6a14c81
Skip unrepresentable Snowflake metrics and wire Cortex fields into na…
nicosuave Jun 14, 2026
b19d987
Coerce Snowflake sample_values to str and export graph-level metric s…
nicosuave Jun 14, 2026
f718051
Preserve graph-level metadata across native export round-trips
nicosuave Jun 14, 2026
6640a93
Preserve Snowflake relationship names and metric using_relationships
nicosuave Jun 14, 2026
2284417
Match owned Snowflake metrics by identity so same-named top-level met…
nicosuave Jun 14, 2026
55c8517
Accept Snowflake enrichment fields in the Rust native schema
nicosuave Jun 14, 2026
642cde3
Merge remote-tracking branch 'origin/main' into wf-snowflake-200
nicosuave Jun 14, 2026
a322a39
Merge Snowflake graph metadata during directory loading
nicosuave Jun 15, 2026
b68e9e2
Round-trip Snowflake non-additive metrics, private access, multi-file…
nicosuave Jun 15, 2026
71d5216
Keep Snowflake metric expressions resolvable across contexts
nicosuave Jun 15, 2026
7cf5af0
Defer Snowflake top-level metrics until all tables are parsed
nicosuave Jun 15, 2026
da115d3
Resolve Snowflake cross-file top-level metrics in the CLI loader
nicosuave Jun 15, 2026
87ea415
Detect metric-only Snowflake Cortex files in the directory loader
nicosuave Jun 15, 2026
c684a99
Allow tableless metrics in split Snowflake Cortex metrics files
nicosuave Jun 15, 2026
d20f85d
Route tableless Snowflake view-metric sidecars with top-level sections
nicosuave Jun 15, 2026
5ef649c
Route instruction-only Snowflake Cortex sidecars
nicosuave Jun 15, 2026
fca4603
Avoid pending-metric name collisions and merge non-OSI root metadata …
nicosuave Jun 15, 2026
0ffb3a8
Route and defer relationship-only Snowflake Cortex sidecars
nicosuave Jun 15, 2026
ef6e760
Prefer explicit Snowflake joins and route metric-key sidecars
nicosuave Jun 15, 2026
4db2970
Merge origin/main into update-snowflake-adapter
nicosuave Jun 15, 2026
7cb7c30
Merge origin/main into update-snowflake-adapter
nicosuave Jun 15, 2026
892f84e
Keep distinct same-target Snowflake relationships in directory loader
nicosuave Jun 15, 2026
976b382
Route named tableless Cortex view-metric sidecars to Snowflake
nicosuave Jun 15, 2026
3d47659
Fix Snowflake access override and SQL metadata frontmatter
nicosuave Jun 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 138 additions & 0 deletions sidemantic-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
"Dimension": {
"description": "Dimension (attribute) definition.\n\nDimensions are used for grouping and filtering in queries.",
"properties": {
"cortex_search_service_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Linked Cortex Search service name (Snowflake Cortex Analyst)",
"title": "Cortex Search Service Name"
},
"dax": {
"anyOf": [
{
Expand Down Expand Up @@ -147,6 +160,22 @@
"title": "Public",
"type": "boolean"
},
"sample_values": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Representative sample values for this dimension",
"title": "Sample Values"
},
"sql": {
"anyOf": [
{
Expand Down Expand Up @@ -176,6 +205,22 @@
"description": "Supported granularities for time dimensions",
"title": "Supported Granularities"
},
"synonyms": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Alternative names for this dimension",
"title": "Synonyms"
},
"type": {
"description": "Dimension type",
"enum": [
Expand Down Expand Up @@ -812,6 +857,22 @@
"description": "N-step funnel filter expressions (overrides base_event/conversion_event)",
"title": "Steps"
},
"synonyms": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Alternative names for this measure/metric",
"title": "Synonyms"
},
"time_offset": {
"anyOf": [
{
Expand Down Expand Up @@ -2013,6 +2074,22 @@
"description": "N-step funnel filter expressions (overrides base_event/conversion_event)",
"title": "Steps"
},
"synonyms": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Alternative names for this measure/metric",
"title": "Synonyms"
},
"time_offset": {
"anyOf": [
{
Expand Down Expand Up @@ -2129,6 +2206,19 @@
"Dimension": {
"description": "Dimension (attribute) definition.\n\nDimensions are used for grouping and filtering in queries.",
"properties": {
"cortex_search_service_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Linked Cortex Search service name (Snowflake Cortex Analyst)",
"title": "Cortex Search Service Name"
},
"dax": {
"anyOf": [
{
Expand Down Expand Up @@ -2273,6 +2363,22 @@
"title": "Public",
"type": "boolean"
},
"sample_values": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Representative sample values for this dimension",
"title": "Sample Values"
},
"sql": {
"anyOf": [
{
Expand Down Expand Up @@ -2302,6 +2408,22 @@
"description": "Supported granularities for time dimensions",
"title": "Supported Granularities"
},
"synonyms": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Alternative names for this dimension",
"title": "Synonyms"
},
"type": {
"description": "Dimension type",
"enum": [
Expand Down Expand Up @@ -2938,6 +3060,22 @@
"description": "N-step funnel filter expressions (overrides base_event/conversion_event)",
"title": "Steps"
},
"synonyms": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Alternative names for this measure/metric",
"title": "Synonyms"
},
"time_offset": {
"anyOf": [
{
Expand Down
18 changes: 18 additions & 0 deletions sidemantic/adapters/sidemantic.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@
"label",
"metadata",
"meta",
"synonyms",
"sample_values",
"cortex_search_service_name",
"format",
"value_format_name",
"parent",
Expand Down Expand Up @@ -118,6 +121,7 @@
"periods",
"retention_granularity",
"granularity",
"synonyms",
"inner_metrics",
"entity_dimensions",
"having",
Expand Down Expand Up @@ -561,6 +565,9 @@ def _parse_model(self, model_def: dict, *, source_path: Path | None = None) -> M
parent=dim_def.get("parent"),
metadata=dim_def.get("metadata"),
meta=dim_def.get("meta"),
synonyms=dim_def.get("synonyms"),
sample_values=dim_def.get("sample_values"),
cortex_search_service_name=dim_def.get("cortex_search_service_name"),
window=dim_def.get("window"),
)
dimensions.append(dimension)
Expand Down Expand Up @@ -781,6 +788,7 @@ def _parse_metric(
"value_format_name",
"drill_fields",
"non_additive_dimension",
"synonyms",
Comment thread
nicosuave marked this conversation as resolved.
"meta",
"public",
]:
Expand Down Expand Up @@ -928,6 +936,12 @@ def _export_model(self, model: Model) -> dict:
dim_def["metadata"] = dim.metadata
if dim.meta:
dim_def["meta"] = dim.meta
if dim.synonyms:
dim_def["synonyms"] = dim.synonyms
if dim.sample_values:
dim_def["sample_values"] = dim.sample_values
if dim.cortex_search_service_name:
dim_def["cortex_search_service_name"] = dim.cortex_search_service_name
Comment thread
nicosuave marked this conversation as resolved.
if dim.format:
dim_def["format"] = dim.format
if dim.value_format_name:
Expand Down Expand Up @@ -966,6 +980,8 @@ def _export_model(self, model: Model) -> dict:
measure_def["metadata"] = measure.metadata
if measure.meta:
measure_def["meta"] = measure.meta
if measure.synonyms:
measure_def["synonyms"] = measure.synonyms
if not measure.public:
measure_def["public"] = measure.public
if measure.format:
Expand Down Expand Up @@ -1089,6 +1105,8 @@ def _export_metric(self, measure: Metric, graph) -> dict:
result["metadata"] = measure.metadata
if measure.meta:
result["meta"] = measure.meta
if measure.synonyms:
result["synonyms"] = measure.synonyms
if not measure.public:
result["public"] = measure.public

Expand Down
Loading
Loading