Skip to content

Commit 0096e66

Browse files
Auto-update JSON schema
1 parent b7e6aee commit 0096e66

1 file changed

Lines changed: 177 additions & 3 deletions

File tree

sidemantic-schema.json

Lines changed: 177 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,19 @@
215215
"Metric": {
216216
"description": "Measure definition - supports simple aggregations and complex metric types.\n\nMeasures can be:\n- Simple aggregations: SUM(amount), COUNT(*), AVG(price)\n- Ratios: revenue / order_count\n- Derived formulas: (revenue - cost) / revenue\n- Cumulative: running totals, period-to-date\n- Time comparisons: YoY, MoM growth\n- Conversion funnels: signup -> purchase rate\n\nAuto-registers as a graph-level metric with the current semantic layer context if available.",
217217
"properties": {
218+
"activity_event": {
219+
"anyOf": [
220+
{
221+
"type": "string"
222+
},
223+
{
224+
"type": "null"
225+
}
226+
],
227+
"default": null,
228+
"description": "SQL filter for activity event (default: any event, e.g., \"event IS NOT NULL\")",
229+
"title": "Activity Event"
230+
},
218231
"agg": {
219232
"anyOf": [
220233
{
@@ -285,6 +298,19 @@
285298
"description": "Comparison calculation (default: percent_change)",
286299
"title": "Calculation"
287300
},
301+
"cohort_event": {
302+
"anyOf": [
303+
{
304+
"type": "string"
305+
},
306+
{
307+
"type": "null"
308+
}
309+
],
310+
"default": null,
311+
"description": "SQL filter for cohort-defining event (e.g., \"event = 'install'\")",
312+
"title": "Cohort Event"
313+
},
288314
"comparison_type": {
289315
"anyOf": [
290316
{
@@ -553,12 +579,43 @@
553579
"description": "Time offset for denominator (e.g., '1 month')",
554580
"title": "Offset Window"
555581
},
582+
"periods": {
583+
"anyOf": [
584+
{
585+
"type": "integer"
586+
},
587+
{
588+
"type": "null"
589+
}
590+
],
591+
"default": null,
592+
"description": "Number of retention periods to compute (e.g., 28 for 28-day)",
593+
"title": "Periods"
594+
},
556595
"public": {
557596
"default": true,
558597
"description": "Whether metric is visible in API/UI",
559598
"title": "Public",
560599
"type": "boolean"
561600
},
601+
"retention_granularity": {
602+
"anyOf": [
603+
{
604+
"enum": [
605+
"day",
606+
"week",
607+
"month"
608+
],
609+
"type": "string"
610+
},
611+
{
612+
"type": "null"
613+
}
614+
],
615+
"default": null,
616+
"description": "Time granularity for retention periods (day, week, month)",
617+
"title": "Retention Granularity"
618+
},
562619
"sql": {
563620
"anyOf": [
564621
{
@@ -593,7 +650,8 @@
593650
"derived",
594651
"cumulative",
595652
"time_comparison",
596-
"conversion"
653+
"conversion",
654+
"retention"
597655
],
598656
"type": "string"
599657
},
@@ -1148,6 +1206,19 @@
11481206
"items": {
11491207
"description": "Measure definition - supports simple aggregations and complex metric types.\n\nMeasures can be:\n- Simple aggregations: SUM(amount), COUNT(*), AVG(price)\n- Ratios: revenue / order_count\n- Derived formulas: (revenue - cost) / revenue\n- Cumulative: running totals, period-to-date\n- Time comparisons: YoY, MoM growth\n- Conversion funnels: signup -> purchase rate\n\nAuto-registers as a graph-level metric with the current semantic layer context if available.",
11501208
"properties": {
1209+
"activity_event": {
1210+
"anyOf": [
1211+
{
1212+
"type": "string"
1213+
},
1214+
{
1215+
"type": "null"
1216+
}
1217+
],
1218+
"default": null,
1219+
"description": "SQL filter for activity event (default: any event, e.g., \"event IS NOT NULL\")",
1220+
"title": "Activity Event"
1221+
},
11511222
"agg": {
11521223
"anyOf": [
11531224
{
@@ -1218,6 +1289,19 @@
12181289
"description": "Comparison calculation (default: percent_change)",
12191290
"title": "Calculation"
12201291
},
1292+
"cohort_event": {
1293+
"anyOf": [
1294+
{
1295+
"type": "string"
1296+
},
1297+
{
1298+
"type": "null"
1299+
}
1300+
],
1301+
"default": null,
1302+
"description": "SQL filter for cohort-defining event (e.g., \"event = 'install'\")",
1303+
"title": "Cohort Event"
1304+
},
12211305
"comparison_type": {
12221306
"anyOf": [
12231307
{
@@ -1486,12 +1570,43 @@
14861570
"description": "Time offset for denominator (e.g., '1 month')",
14871571
"title": "Offset Window"
14881572
},
1573+
"periods": {
1574+
"anyOf": [
1575+
{
1576+
"type": "integer"
1577+
},
1578+
{
1579+
"type": "null"
1580+
}
1581+
],
1582+
"default": null,
1583+
"description": "Number of retention periods to compute (e.g., 28 for 28-day)",
1584+
"title": "Periods"
1585+
},
14891586
"public": {
14901587
"default": true,
14911588
"description": "Whether metric is visible in API/UI",
14921589
"title": "Public",
14931590
"type": "boolean"
14941591
},
1592+
"retention_granularity": {
1593+
"anyOf": [
1594+
{
1595+
"enum": [
1596+
"day",
1597+
"week",
1598+
"month"
1599+
],
1600+
"type": "string"
1601+
},
1602+
{
1603+
"type": "null"
1604+
}
1605+
],
1606+
"default": null,
1607+
"description": "Time granularity for retention periods (day, week, month)",
1608+
"title": "Retention Granularity"
1609+
},
14951610
"sql": {
14961611
"anyOf": [
14971612
{
@@ -1526,7 +1641,8 @@
15261641
"derived",
15271642
"cumulative",
15281643
"time_comparison",
1529-
"conversion"
1644+
"conversion",
1645+
"retention"
15301646
],
15311647
"type": "string"
15321648
},
@@ -1831,6 +1947,19 @@
18311947
"Metric": {
18321948
"description": "Measure definition - supports simple aggregations and complex metric types.\n\nMeasures can be:\n- Simple aggregations: SUM(amount), COUNT(*), AVG(price)\n- Ratios: revenue / order_count\n- Derived formulas: (revenue - cost) / revenue\n- Cumulative: running totals, period-to-date\n- Time comparisons: YoY, MoM growth\n- Conversion funnels: signup -> purchase rate\n\nAuto-registers as a graph-level metric with the current semantic layer context if available.",
18331949
"properties": {
1950+
"activity_event": {
1951+
"anyOf": [
1952+
{
1953+
"type": "string"
1954+
},
1955+
{
1956+
"type": "null"
1957+
}
1958+
],
1959+
"default": null,
1960+
"description": "SQL filter for activity event (default: any event, e.g., \"event IS NOT NULL\")",
1961+
"title": "Activity Event"
1962+
},
18341963
"agg": {
18351964
"anyOf": [
18361965
{
@@ -1901,6 +2030,19 @@
19012030
"description": "Comparison calculation (default: percent_change)",
19022031
"title": "Calculation"
19032032
},
2033+
"cohort_event": {
2034+
"anyOf": [
2035+
{
2036+
"type": "string"
2037+
},
2038+
{
2039+
"type": "null"
2040+
}
2041+
],
2042+
"default": null,
2043+
"description": "SQL filter for cohort-defining event (e.g., \"event = 'install'\")",
2044+
"title": "Cohort Event"
2045+
},
19042046
"comparison_type": {
19052047
"anyOf": [
19062048
{
@@ -2169,12 +2311,43 @@
21692311
"description": "Time offset for denominator (e.g., '1 month')",
21702312
"title": "Offset Window"
21712313
},
2314+
"periods": {
2315+
"anyOf": [
2316+
{
2317+
"type": "integer"
2318+
},
2319+
{
2320+
"type": "null"
2321+
}
2322+
],
2323+
"default": null,
2324+
"description": "Number of retention periods to compute (e.g., 28 for 28-day)",
2325+
"title": "Periods"
2326+
},
21722327
"public": {
21732328
"default": true,
21742329
"description": "Whether metric is visible in API/UI",
21752330
"title": "Public",
21762331
"type": "boolean"
21772332
},
2333+
"retention_granularity": {
2334+
"anyOf": [
2335+
{
2336+
"enum": [
2337+
"day",
2338+
"week",
2339+
"month"
2340+
],
2341+
"type": "string"
2342+
},
2343+
{
2344+
"type": "null"
2345+
}
2346+
],
2347+
"default": null,
2348+
"description": "Time granularity for retention periods (day, week, month)",
2349+
"title": "Retention Granularity"
2350+
},
21782351
"sql": {
21792352
"anyOf": [
21802353
{
@@ -2209,7 +2382,8 @@
22092382
"derived",
22102383
"cumulative",
22112384
"time_comparison",
2212-
"conversion"
2385+
"conversion",
2386+
"retention"
22132387
],
22142388
"type": "string"
22152389
},

0 commit comments

Comments
 (0)