@lightdash/common 3.264.0 → 3.265.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/schemas/chartAsCodeSchema.d.ts +1497 -63
- package/dist/cjs/schemas/chartAsCodeSchema.d.ts.map +1 -1
- package/dist/cjs/schemas/generateChartAsCodeSchema.d.ts.map +1 -1
- package/dist/cjs/schemas/generateChartAsCodeSchema.js +27 -6
- package/dist/cjs/schemas/generateChartAsCodeSchema.js.map +1 -1
- package/dist/cjs/schemas/json/chart-as-code-1.0.json +803 -45
- package/dist/cjs/schemas/json/dashboard-as-code-1.0.json +84 -1
- package/dist/cjs/types/contentAsCode/composerCharts.d.ts +41 -0
- package/dist/cjs/types/contentAsCode/composerCharts.d.ts.map +1 -0
- package/dist/cjs/types/contentAsCode/composerCharts.js +3 -0
- package/dist/cjs/types/contentAsCode/composerCharts.js.map +1 -0
- package/dist/cjs/types/contentAsCode/core.d.ts +1 -0
- package/dist/cjs/types/contentAsCode/core.d.ts.map +1 -1
- package/dist/cjs/types/contentAsCode/core.js +1 -0
- package/dist/cjs/types/contentAsCode/core.js.map +1 -1
- package/dist/cjs/types/contentAsCode/dashboards.d.ts +9 -2
- package/dist/cjs/types/contentAsCode/dashboards.d.ts.map +1 -1
- package/dist/cjs/types/contentAsCode/index.d.ts +1 -0
- package/dist/cjs/types/contentAsCode/index.d.ts.map +1 -1
- package/dist/cjs/types/contentAsCode/index.js +1 -0
- package/dist/cjs/types/contentAsCode/index.js.map +1 -1
- package/dist/cjs/types/dashboard.d.ts +1 -0
- package/dist/cjs/types/dashboard.d.ts.map +1 -1
- package/dist/cjs/types/dashboard.js.map +1 -1
- package/dist/cjs/utils/i18n/dashboardAsCode.d.ts +20 -0
- package/dist/cjs/utils/i18n/dashboardAsCode.d.ts.map +1 -1
- package/dist/cjs/utils/i18n/dashboardAsCode.js +6 -0
- package/dist/cjs/utils/i18n/dashboardAsCode.js.map +1 -1
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/ee/AiAgent/chartConfig/web/getWebAiChartConfig.d.ts +13 -13
- package/dist/esm/ee/AiAgent/utils.d.ts +12 -12
- package/dist/esm/schemas/chartAsCodeSchema.d.ts +1497 -63
- package/dist/esm/schemas/chartAsCodeSchema.d.ts.map +1 -1
- package/dist/esm/schemas/generateChartAsCodeSchema.d.ts.map +1 -1
- package/dist/esm/schemas/generateChartAsCodeSchema.js +27 -6
- package/dist/esm/schemas/generateChartAsCodeSchema.js.map +1 -1
- package/dist/esm/schemas/json/chart-as-code-1.0.json +803 -45
- package/dist/esm/schemas/json/dashboard-as-code-1.0.json +84 -1
- package/dist/esm/types/contentAsCode/composerCharts.d.ts +41 -0
- package/dist/esm/types/contentAsCode/composerCharts.d.ts.map +1 -0
- package/dist/esm/types/contentAsCode/composerCharts.js +2 -0
- package/dist/esm/types/contentAsCode/composerCharts.js.map +1 -0
- package/dist/esm/types/contentAsCode/core.d.ts +1 -0
- package/dist/esm/types/contentAsCode/core.d.ts.map +1 -1
- package/dist/esm/types/contentAsCode/core.js +1 -0
- package/dist/esm/types/contentAsCode/core.js.map +1 -1
- package/dist/esm/types/contentAsCode/dashboards.d.ts +9 -2
- package/dist/esm/types/contentAsCode/dashboards.d.ts.map +1 -1
- package/dist/esm/types/contentAsCode/index.d.ts +1 -0
- package/dist/esm/types/contentAsCode/index.d.ts.map +1 -1
- package/dist/esm/types/contentAsCode/index.js +1 -0
- package/dist/esm/types/contentAsCode/index.js.map +1 -1
- package/dist/esm/types/dashboard.d.ts +1 -0
- package/dist/esm/types/dashboard.d.ts.map +1 -1
- package/dist/esm/types/dashboard.js.map +1 -1
- package/dist/esm/utils/i18n/dashboardAsCode.d.ts +20 -0
- package/dist/esm/utils/i18n/dashboardAsCode.d.ts.map +1 -1
- package/dist/esm/utils/i18n/dashboardAsCode.js +6 -0
- package/dist/esm/utils/i18n/dashboardAsCode.js.map +1 -1
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/ee/AiAgent/chartConfig/web/getWebAiChartConfig.d.ts +13 -13
- package/dist/types/ee/AiAgent/utils.d.ts +12 -12
- package/dist/types/schemas/chartAsCodeSchema.d.ts +1497 -63
- package/dist/types/schemas/chartAsCodeSchema.d.ts.map +1 -1
- package/dist/types/schemas/generateChartAsCodeSchema.d.ts.map +1 -1
- package/dist/types/schemas/generateChartAsCodeSchema.js +27 -6
- package/dist/types/schemas/generateChartAsCodeSchema.js.map +1 -1
- package/dist/types/schemas/json/chart-as-code-1.0.json +803 -45
- package/dist/types/schemas/json/dashboard-as-code-1.0.json +84 -1
- package/dist/types/types/contentAsCode/composerCharts.d.ts +41 -0
- package/dist/types/types/contentAsCode/composerCharts.d.ts.map +1 -0
- package/dist/types/types/contentAsCode/composerCharts.js +2 -0
- package/dist/types/types/contentAsCode/composerCharts.js.map +1 -0
- package/dist/types/types/contentAsCode/core.d.ts +1 -0
- package/dist/types/types/contentAsCode/core.d.ts.map +1 -1
- package/dist/types/types/contentAsCode/core.js +1 -0
- package/dist/types/types/contentAsCode/core.js.map +1 -1
- package/dist/types/types/contentAsCode/dashboards.d.ts +9 -2
- package/dist/types/types/contentAsCode/dashboards.d.ts.map +1 -1
- package/dist/types/types/contentAsCode/index.d.ts +1 -0
- package/dist/types/types/contentAsCode/index.d.ts.map +1 -1
- package/dist/types/types/contentAsCode/index.js +1 -0
- package/dist/types/types/contentAsCode/index.js.map +1 -1
- package/dist/types/types/dashboard.d.ts +1 -0
- package/dist/types/types/dashboard.d.ts.map +1 -1
- package/dist/types/types/dashboard.js.map +1 -1
- package/dist/types/utils/i18n/dashboardAsCode.d.ts +20 -0
- package/dist/types/utils/i18n/dashboardAsCode.d.ts.map +1 -1
- package/dist/types/utils/i18n/dashboardAsCode.js +6 -0
- package/dist/types/utils/i18n/dashboardAsCode.js.map +1 -1
- package/package.json +1 -1
|
@@ -1113,6 +1113,137 @@
|
|
|
1113
1113
|
"enum": ["raw", "percentage"],
|
|
1114
1114
|
"type": "string"
|
|
1115
1115
|
},
|
|
1116
|
+
"ComposerChartAsCode": {
|
|
1117
|
+
"additionalProperties": false,
|
|
1118
|
+
"description": "A composer chart: a pipeline of nodes and a chart over its result columns, owned by a dashboard",
|
|
1119
|
+
"properties": {
|
|
1120
|
+
"chart": {
|
|
1121
|
+
"$ref": "#/$defs/ComposerStoredChartAsCode"
|
|
1122
|
+
},
|
|
1123
|
+
"contentType": {
|
|
1124
|
+
"$ref": "#/$defs/ContentAsCodeType.COMPOSER_CHART"
|
|
1125
|
+
},
|
|
1126
|
+
"dashboardSlug": {
|
|
1127
|
+
"description": "The owning dashboard. Ignored on upload when the chart already exists.",
|
|
1128
|
+
"type": "string"
|
|
1129
|
+
},
|
|
1130
|
+
"description": {
|
|
1131
|
+
"type": ["string", "null"]
|
|
1132
|
+
},
|
|
1133
|
+
"downloadedAt": {
|
|
1134
|
+
"format": "date-time",
|
|
1135
|
+
"type": "string"
|
|
1136
|
+
},
|
|
1137
|
+
"name": {
|
|
1138
|
+
"type": "string"
|
|
1139
|
+
},
|
|
1140
|
+
"pipeline": {
|
|
1141
|
+
"$ref": "#/$defs/ComposerChartPipeline"
|
|
1142
|
+
},
|
|
1143
|
+
"slug": {
|
|
1144
|
+
"type": "string"
|
|
1145
|
+
},
|
|
1146
|
+
"spaceSlug": {
|
|
1147
|
+
"description": "Only used to create a placeholder dashboard when dashboardSlug names none.",
|
|
1148
|
+
"type": "string"
|
|
1149
|
+
},
|
|
1150
|
+
"updatedAt": {
|
|
1151
|
+
"format": "date-time",
|
|
1152
|
+
"type": "string"
|
|
1153
|
+
},
|
|
1154
|
+
"version": {
|
|
1155
|
+
"format": "double",
|
|
1156
|
+
"type": "number"
|
|
1157
|
+
}
|
|
1158
|
+
},
|
|
1159
|
+
"required": [
|
|
1160
|
+
"chart",
|
|
1161
|
+
"pipeline",
|
|
1162
|
+
"spaceSlug",
|
|
1163
|
+
"dashboardSlug",
|
|
1164
|
+
"description",
|
|
1165
|
+
"name",
|
|
1166
|
+
"slug",
|
|
1167
|
+
"version",
|
|
1168
|
+
"contentType"
|
|
1169
|
+
],
|
|
1170
|
+
"type": "object"
|
|
1171
|
+
},
|
|
1172
|
+
"ComposerChartColumn": {
|
|
1173
|
+
"properties": {
|
|
1174
|
+
"fieldType": {
|
|
1175
|
+
"anyOf": [
|
|
1176
|
+
{
|
|
1177
|
+
"$ref": "#/$defs/FieldType.DIMENSION"
|
|
1178
|
+
},
|
|
1179
|
+
{
|
|
1180
|
+
"$ref": "#/$defs/FieldType.METRIC"
|
|
1181
|
+
}
|
|
1182
|
+
]
|
|
1183
|
+
},
|
|
1184
|
+
"reference": {
|
|
1185
|
+
"type": "string"
|
|
1186
|
+
}
|
|
1187
|
+
},
|
|
1188
|
+
"required": ["fieldType", "reference"],
|
|
1189
|
+
"type": "object"
|
|
1190
|
+
},
|
|
1191
|
+
"ComposerChartPipeline": {
|
|
1192
|
+
"properties": {
|
|
1193
|
+
"nodes": {
|
|
1194
|
+
"items": {
|
|
1195
|
+
"$ref": "#/$defs/ComposerChartPipelineNode"
|
|
1196
|
+
},
|
|
1197
|
+
"type": "array"
|
|
1198
|
+
},
|
|
1199
|
+
"schemaVersion": {
|
|
1200
|
+
"enum": [1],
|
|
1201
|
+
"type": "number"
|
|
1202
|
+
},
|
|
1203
|
+
"terminalNodeId": {
|
|
1204
|
+
"type": "string"
|
|
1205
|
+
}
|
|
1206
|
+
},
|
|
1207
|
+
"required": ["nodes", "terminalNodeId", "schemaVersion"],
|
|
1208
|
+
"type": "object"
|
|
1209
|
+
},
|
|
1210
|
+
"ComposerChartPipelineNode": {
|
|
1211
|
+
"anyOf": [
|
|
1212
|
+
{
|
|
1213
|
+
"$ref": "#/$defs/StoredNode_SemanticLayerSourceQuery_"
|
|
1214
|
+
},
|
|
1215
|
+
{
|
|
1216
|
+
"$ref": "#/$defs/StoredNode_SqlSourceQuery_"
|
|
1217
|
+
},
|
|
1218
|
+
{
|
|
1219
|
+
"$ref": "#/$defs/StoredNode_DuckdbSourceQuery_"
|
|
1220
|
+
},
|
|
1221
|
+
{
|
|
1222
|
+
"$ref": "#/$defs/StoredNode_Omit_PythonSourceQuery.pivotConfiguration__"
|
|
1223
|
+
},
|
|
1224
|
+
{
|
|
1225
|
+
"$ref": "#/$defs/StoredNode_Omit_MergeSourceQuery.pivotConfiguration__"
|
|
1226
|
+
}
|
|
1227
|
+
],
|
|
1228
|
+
"description": "A node of a stored composer chart pipeline; kinds a dashboard viewer can run."
|
|
1229
|
+
},
|
|
1230
|
+
"ComposerStoredChartAsCode": {
|
|
1231
|
+
"allOf": [
|
|
1232
|
+
{
|
|
1233
|
+
"$ref": "#/$defs/Omit_ComposerStoredChart.chartConfig_"
|
|
1234
|
+
},
|
|
1235
|
+
{
|
|
1236
|
+
"properties": {
|
|
1237
|
+
"chartConfig": {
|
|
1238
|
+
"$ref": "#/$defs/ChartAsCodeConfig"
|
|
1239
|
+
}
|
|
1240
|
+
},
|
|
1241
|
+
"required": ["chartConfig"],
|
|
1242
|
+
"type": "object"
|
|
1243
|
+
}
|
|
1244
|
+
],
|
|
1245
|
+
"description": "The stored chart, with a custom chart type named by its portable slug."
|
|
1246
|
+
},
|
|
1116
1247
|
"ConditionalFormattingColorApplyTo": {
|
|
1117
1248
|
"enum": ["cell", "text", "row"],
|
|
1118
1249
|
"type": "string"
|
|
@@ -1481,6 +1612,10 @@
|
|
|
1481
1612
|
"enum": ["chart"],
|
|
1482
1613
|
"type": "string"
|
|
1483
1614
|
},
|
|
1615
|
+
"ContentAsCodeType.COMPOSER_CHART": {
|
|
1616
|
+
"enum": ["composer_chart"],
|
|
1617
|
+
"type": "string"
|
|
1618
|
+
},
|
|
1484
1619
|
"ContentAsCodeType.SQL_CHART": {
|
|
1485
1620
|
"enum": ["sql_chart"],
|
|
1486
1621
|
"type": "string"
|
|
@@ -1855,6 +1990,53 @@
|
|
|
1855
1990
|
"enum": ["string", "number", "timestamp", "date", "boolean"],
|
|
1856
1991
|
"type": "string"
|
|
1857
1992
|
},
|
|
1993
|
+
"DuckdbSourceQuery": {
|
|
1994
|
+
"description": "A DuckDB compose query as a source query. References expose other queries'\nresults as named tables the SQL can select from; a referenced result's\ncolumn names are those of the upstream query's result (field ids for\nsemanticLayer queries, SELECT output names for sql queries).\n\nReferences that name queries still running are waited on: this query\nexecutes once every referenced result is ready, and fails if any\nreferenced query fails.",
|
|
1995
|
+
"properties": {
|
|
1996
|
+
"description": {
|
|
1997
|
+
"description": "One-line note on what this query does, shown under the title.",
|
|
1998
|
+
"type": "string"
|
|
1999
|
+
},
|
|
2000
|
+
"limit": {
|
|
2001
|
+
"format": "double",
|
|
2002
|
+
"type": "number"
|
|
2003
|
+
},
|
|
2004
|
+
"nodeId": {
|
|
2005
|
+
"$ref": "#/$defs/QueryNodeId",
|
|
2006
|
+
"description": "Names this query so other queries in the same submission can reference its results."
|
|
2007
|
+
},
|
|
2008
|
+
"pivotConfiguration": {
|
|
2009
|
+
"$ref": "#/$defs/PivotConfiguration",
|
|
2010
|
+
"description": "Pivots this node's result over the columns its SQL returns; checked at\nsubmission. Results carry pivotDetails. Omit for an unpivoted result."
|
|
2011
|
+
},
|
|
2012
|
+
"references": {
|
|
2013
|
+
"anyOf": [
|
|
2014
|
+
{
|
|
2015
|
+
"items": {
|
|
2016
|
+
"$ref": "#/$defs/QueryNodeId"
|
|
2017
|
+
},
|
|
2018
|
+
"type": "array"
|
|
2019
|
+
},
|
|
2020
|
+
{
|
|
2021
|
+
"$ref": "#/$defs/Record_QuerySourceTableName.QueryResultReference_"
|
|
2022
|
+
}
|
|
2023
|
+
],
|
|
2024
|
+
"description": "Which query results the SQL reads, in one of two forms. Shorthand\narray: node ids of queries in the same submission, each exposed as a\ntable named by its node id — [\"orders\", \"revenue\"] lets the SQL run\nSELECT * FROM orders JOIN revenue. Map form for aliasing or existing\nresults: {tableName: nodeIdOrQueryUuid}, e.g. {\"o\": \"orders\", \"prev\":\n\"<queryUuid>\"}. Required at execution: the query runs on a session\nthat can reach only these results, so one that references nothing is\nrefused."
|
|
2025
|
+
},
|
|
2026
|
+
"sourceType": {
|
|
2027
|
+
"$ref": "#/$defs/QuerySourceType.DUCKDB"
|
|
2028
|
+
},
|
|
2029
|
+
"sql": {
|
|
2030
|
+
"type": "string"
|
|
2031
|
+
},
|
|
2032
|
+
"title": {
|
|
2033
|
+
"description": "Plain-language label shown to users instead of the node id. Optional: the public query-sources API accepts and ignores it.",
|
|
2034
|
+
"type": "string"
|
|
2035
|
+
}
|
|
2036
|
+
},
|
|
2037
|
+
"required": ["sql", "sourceType"],
|
|
2038
|
+
"type": "object"
|
|
2039
|
+
},
|
|
1858
2040
|
"EChartsConfig": {
|
|
1859
2041
|
"$ref": "#/$defs/Partial_CompleteEChartsConfig_"
|
|
1860
2042
|
},
|
|
@@ -1974,6 +2156,14 @@
|
|
|
1974
2156
|
"required": ["fieldId"],
|
|
1975
2157
|
"type": "object"
|
|
1976
2158
|
},
|
|
2159
|
+
"FieldType.DIMENSION": {
|
|
2160
|
+
"enum": ["dimension"],
|
|
2161
|
+
"type": "string"
|
|
2162
|
+
},
|
|
2163
|
+
"FieldType.METRIC": {
|
|
2164
|
+
"enum": ["metric"],
|
|
2165
|
+
"type": "string"
|
|
2166
|
+
},
|
|
1977
2167
|
"FilterGroup": {
|
|
1978
2168
|
"anyOf": [
|
|
1979
2169
|
{
|
|
@@ -2484,6 +2674,15 @@
|
|
|
2484
2674
|
"required": ["color", "max", "min"],
|
|
2485
2675
|
"type": "object"
|
|
2486
2676
|
},
|
|
2677
|
+
"GroupByColumn": {
|
|
2678
|
+
"properties": {
|
|
2679
|
+
"reference": {
|
|
2680
|
+
"type": "string"
|
|
2681
|
+
}
|
|
2682
|
+
},
|
|
2683
|
+
"required": ["reference"],
|
|
2684
|
+
"type": "object"
|
|
2685
|
+
},
|
|
2487
2686
|
"GroupValueMatchType": {
|
|
2488
2687
|
"enum": ["exact", "startsWith", "endsWith", "includes"],
|
|
2489
2688
|
"type": "string"
|
|
@@ -2858,6 +3057,20 @@
|
|
|
2858
3057
|
"enum": ["full", "left", "inner"],
|
|
2859
3058
|
"type": "string"
|
|
2860
3059
|
},
|
|
3060
|
+
"MergeSourceQueryInput": {
|
|
3061
|
+
"description": "One input of a merge node: a semanticLayer node of the same submission.",
|
|
3062
|
+
"properties": {
|
|
3063
|
+
"nodeId": {
|
|
3064
|
+
"$ref": "#/$defs/QueryNodeId"
|
|
3065
|
+
},
|
|
3066
|
+
"repeatValues": {
|
|
3067
|
+
"description": "See MergeQueryMetricSource.repeatValues.",
|
|
3068
|
+
"type": "boolean"
|
|
3069
|
+
}
|
|
3070
|
+
},
|
|
3071
|
+
"required": ["nodeId"],
|
|
3072
|
+
"type": "object"
|
|
3073
|
+
},
|
|
2861
3074
|
"MergeTableCalculation": {
|
|
2862
3075
|
"description": "A calculation over the *merged* result, where a row-wise calculation across\nsource queries can correctly live. Formula references use merged field ids;\nlegacy SQL references use `${sourceId.fieldId}`.",
|
|
2863
3076
|
"properties": {
|
|
@@ -3075,6 +3288,10 @@
|
|
|
3075
3288
|
],
|
|
3076
3289
|
"type": "string"
|
|
3077
3290
|
},
|
|
3291
|
+
"Omit_ComposerStoredChart.chartConfig_": {
|
|
3292
|
+
"$ref": "#/$defs/Pick_ComposerStoredChart.Exclude_keyofComposerStoredChart.chartConfig__",
|
|
3293
|
+
"description": "Construct a type with the properties of T except for those in type K."
|
|
3294
|
+
},
|
|
3078
3295
|
"Omit_DataAppVizChart.dataAppVizUuid-or-dataAppVizVersion_": {
|
|
3079
3296
|
"$ref": "#/$defs/Pick_DataAppVizChart.Exclude_keyofDataAppVizChart.dataAppVizUuid-or-dataAppVizVersion__",
|
|
3080
3297
|
"description": "Construct a type with the properties of T except for those in type K."
|
|
@@ -3083,10 +3300,18 @@
|
|
|
3083
3300
|
"$ref": "#/$defs/Pick_FilterRule.Exclude_keyofFilterRule.id__",
|
|
3084
3301
|
"description": "Construct a type with the properties of T except for those in type K."
|
|
3085
3302
|
},
|
|
3303
|
+
"Omit_MergeSourceQuery.pivotConfiguration_": {
|
|
3304
|
+
"$ref": "#/$defs/Pick_MergeSourceQuery.Exclude_keyofMergeSourceQuery.pivotConfiguration__",
|
|
3305
|
+
"description": "Construct a type with the properties of T except for those in type K."
|
|
3306
|
+
},
|
|
3086
3307
|
"Omit_MetricQuery.filters_": {
|
|
3087
3308
|
"$ref": "#/$defs/Pick_MetricQuery.Exclude_keyofMetricQuery.filters__",
|
|
3088
3309
|
"description": "Construct a type with the properties of T except for those in type K."
|
|
3089
3310
|
},
|
|
3311
|
+
"Omit_PythonSourceQuery.pivotConfiguration_": {
|
|
3312
|
+
"$ref": "#/$defs/Pick_PythonSourceQuery.Exclude_keyofPythonSourceQuery.pivotConfiguration__",
|
|
3313
|
+
"description": "Construct a type with the properties of T except for those in type K."
|
|
3314
|
+
},
|
|
3090
3315
|
"OrFilterGroup": {
|
|
3091
3316
|
"properties": {
|
|
3092
3317
|
"id": {
|
|
@@ -3315,6 +3540,52 @@
|
|
|
3315
3540
|
"properties": {},
|
|
3316
3541
|
"type": "object"
|
|
3317
3542
|
},
|
|
3543
|
+
"Pick_ComposerStoredChart.Exclude_keyofComposerStoredChart.chartConfig__": {
|
|
3544
|
+
"description": "From T, pick a set of properties whose keys are in the union K",
|
|
3545
|
+
"properties": {
|
|
3546
|
+
"columns": {
|
|
3547
|
+
"items": {
|
|
3548
|
+
"$ref": "#/$defs/ComposerChartColumn"
|
|
3549
|
+
},
|
|
3550
|
+
"type": "array"
|
|
3551
|
+
},
|
|
3552
|
+
"pivotConfig": {
|
|
3553
|
+
"properties": {
|
|
3554
|
+
"columns": {
|
|
3555
|
+
"items": {
|
|
3556
|
+
"type": "string"
|
|
3557
|
+
},
|
|
3558
|
+
"type": "array"
|
|
3559
|
+
}
|
|
3560
|
+
},
|
|
3561
|
+
"required": ["columns"],
|
|
3562
|
+
"type": ["object", "null"]
|
|
3563
|
+
},
|
|
3564
|
+
"schemaVersion": {
|
|
3565
|
+
"enum": [1],
|
|
3566
|
+
"type": "number"
|
|
3567
|
+
},
|
|
3568
|
+
"tableConfig": {
|
|
3569
|
+
"properties": {
|
|
3570
|
+
"columnOrder": {
|
|
3571
|
+
"items": {
|
|
3572
|
+
"type": "string"
|
|
3573
|
+
},
|
|
3574
|
+
"type": "array"
|
|
3575
|
+
}
|
|
3576
|
+
},
|
|
3577
|
+
"required": ["columnOrder"],
|
|
3578
|
+
"type": "object"
|
|
3579
|
+
}
|
|
3580
|
+
},
|
|
3581
|
+
"required": [
|
|
3582
|
+
"pivotConfig",
|
|
3583
|
+
"tableConfig",
|
|
3584
|
+
"schemaVersion",
|
|
3585
|
+
"columns"
|
|
3586
|
+
],
|
|
3587
|
+
"type": "object"
|
|
3588
|
+
},
|
|
3318
3589
|
"Pick_DataAppVizChart.Exclude_keyofDataAppVizChart.dataAppVizUuid-or-dataAppVizVersion__": {
|
|
3319
3590
|
"description": "From T, pick a set of properties whose keys are in the union K",
|
|
3320
3591
|
"properties": {
|
|
@@ -3377,6 +3648,63 @@
|
|
|
3377
3648
|
"required": ["target", "operator"],
|
|
3378
3649
|
"type": "object"
|
|
3379
3650
|
},
|
|
3651
|
+
"Pick_MergeSourceQuery.Exclude_keyofMergeSourceQuery.pivotConfiguration__": {
|
|
3652
|
+
"description": "From T, pick a set of properties whose keys are in the union K",
|
|
3653
|
+
"properties": {
|
|
3654
|
+
"description": {
|
|
3655
|
+
"description": "One-line note on what this query does, shown under the title.",
|
|
3656
|
+
"type": "string"
|
|
3657
|
+
},
|
|
3658
|
+
"joinKey": {
|
|
3659
|
+
"description": "Join key parts, each naming one field per source by node id.",
|
|
3660
|
+
"items": {
|
|
3661
|
+
"$ref": "#/$defs/MergeJoinKeyPart"
|
|
3662
|
+
},
|
|
3663
|
+
"type": "array"
|
|
3664
|
+
},
|
|
3665
|
+
"joinType": {
|
|
3666
|
+
"$ref": "#/$defs/MergeJoinType"
|
|
3667
|
+
},
|
|
3668
|
+
"limit": {
|
|
3669
|
+
"format": "double",
|
|
3670
|
+
"type": "number"
|
|
3671
|
+
},
|
|
3672
|
+
"nodeId": {
|
|
3673
|
+
"description": "Names this query so other queries in the same submission can reference its results.",
|
|
3674
|
+
"type": "string"
|
|
3675
|
+
},
|
|
3676
|
+
"sorts": {
|
|
3677
|
+
"description": "Sort of the merged result, by merged column id. Defaults to join-key order.",
|
|
3678
|
+
"items": {
|
|
3679
|
+
"$ref": "#/$defs/SortField"
|
|
3680
|
+
},
|
|
3681
|
+
"type": "array"
|
|
3682
|
+
},
|
|
3683
|
+
"sources": {
|
|
3684
|
+
"description": "At least two semanticLayer nodes, in order; a left join keeps the first one's rows.",
|
|
3685
|
+
"items": {
|
|
3686
|
+
"$ref": "#/$defs/MergeSourceQueryInput"
|
|
3687
|
+
},
|
|
3688
|
+
"type": "array"
|
|
3689
|
+
},
|
|
3690
|
+
"sourceType": {
|
|
3691
|
+
"$ref": "#/$defs/QuerySourceType.MERGE"
|
|
3692
|
+
},
|
|
3693
|
+
"tableCalculations": {
|
|
3694
|
+
"description": "Calculations over the merged row. Defaults to none.",
|
|
3695
|
+
"items": {
|
|
3696
|
+
"$ref": "#/$defs/MergeTableCalculation"
|
|
3697
|
+
},
|
|
3698
|
+
"type": "array"
|
|
3699
|
+
},
|
|
3700
|
+
"title": {
|
|
3701
|
+
"description": "Plain-language label shown to users instead of the node id. Optional: the public query-sources API accepts and ignores it.",
|
|
3702
|
+
"type": "string"
|
|
3703
|
+
}
|
|
3704
|
+
},
|
|
3705
|
+
"required": ["sourceType", "sources", "joinKey", "joinType"],
|
|
3706
|
+
"type": "object"
|
|
3707
|
+
},
|
|
3380
3708
|
"Pick_Metric.formatOptions_": {
|
|
3381
3709
|
"description": "From T, pick a set of properties whose keys are in the union K",
|
|
3382
3710
|
"properties": {
|
|
@@ -3479,31 +3807,75 @@
|
|
|
3479
3807
|
],
|
|
3480
3808
|
"type": "object"
|
|
3481
3809
|
},
|
|
3482
|
-
"
|
|
3810
|
+
"Pick_PythonSourceQuery.Exclude_keyofPythonSourceQuery.pivotConfiguration__": {
|
|
3811
|
+
"description": "From T, pick a set of properties whose keys are in the union K",
|
|
3483
3812
|
"properties": {
|
|
3484
|
-
"
|
|
3485
|
-
"
|
|
3486
|
-
"description": "Custom colors for each group/slice"
|
|
3813
|
+
"code": {
|
|
3814
|
+
"type": "string"
|
|
3487
3815
|
},
|
|
3488
|
-
"
|
|
3489
|
-
"description": "
|
|
3490
|
-
"
|
|
3491
|
-
"type": "string"
|
|
3492
|
-
},
|
|
3493
|
-
"type": "array"
|
|
3816
|
+
"description": {
|
|
3817
|
+
"description": "One-line note on what this query does, shown under the title.",
|
|
3818
|
+
"type": "string"
|
|
3494
3819
|
},
|
|
3495
|
-
"
|
|
3496
|
-
"
|
|
3497
|
-
"
|
|
3820
|
+
"limit": {
|
|
3821
|
+
"description": "Maximum rows kept from the returned DataFrame.",
|
|
3822
|
+
"format": "double",
|
|
3823
|
+
"type": "number"
|
|
3498
3824
|
},
|
|
3499
|
-
"
|
|
3500
|
-
"description": "
|
|
3501
|
-
"
|
|
3502
|
-
"type": "string"
|
|
3503
|
-
},
|
|
3504
|
-
"type": "array"
|
|
3825
|
+
"nodeId": {
|
|
3826
|
+
"description": "Names this query so other queries in the same submission can reference its results.",
|
|
3827
|
+
"type": "string"
|
|
3505
3828
|
},
|
|
3506
|
-
"
|
|
3829
|
+
"references": {
|
|
3830
|
+
"anyOf": [
|
|
3831
|
+
{
|
|
3832
|
+
"items": {
|
|
3833
|
+
"type": "string"
|
|
3834
|
+
},
|
|
3835
|
+
"type": "array"
|
|
3836
|
+
},
|
|
3837
|
+
{
|
|
3838
|
+
"$ref": "#/$defs/Record_string.string_"
|
|
3839
|
+
}
|
|
3840
|
+
],
|
|
3841
|
+
"description": "Which query results the code reads, in the same two forms as duckdb\nreferences. Shorthand array: node ids of queries in the same\nsubmission, each exposed as inputs[nodeId]. Map form for aliasing or\nexisting results: {inputName: nodeIdOrQueryUuid}. At least one is\nrequired."
|
|
3842
|
+
},
|
|
3843
|
+
"sourceType": {
|
|
3844
|
+
"$ref": "#/$defs/QuerySourceType.PYTHON"
|
|
3845
|
+
},
|
|
3846
|
+
"title": {
|
|
3847
|
+
"description": "Plain-language label shown to users instead of the node id. Optional: the public query-sources API accepts and ignores it.",
|
|
3848
|
+
"type": "string"
|
|
3849
|
+
}
|
|
3850
|
+
},
|
|
3851
|
+
"required": ["sourceType", "code", "references"],
|
|
3852
|
+
"type": "object"
|
|
3853
|
+
},
|
|
3854
|
+
"PieChart": {
|
|
3855
|
+
"properties": {
|
|
3856
|
+
"groupColorOverrides": {
|
|
3857
|
+
"$ref": "#/$defs/Record_string.string_",
|
|
3858
|
+
"description": "Custom colors for each group/slice"
|
|
3859
|
+
},
|
|
3860
|
+
"groupFieldIds": {
|
|
3861
|
+
"description": "Field IDs used for grouping/slicing the pie",
|
|
3862
|
+
"items": {
|
|
3863
|
+
"type": "string"
|
|
3864
|
+
},
|
|
3865
|
+
"type": "array"
|
|
3866
|
+
},
|
|
3867
|
+
"groupLabelOverrides": {
|
|
3868
|
+
"$ref": "#/$defs/Record_string.string_",
|
|
3869
|
+
"description": "Custom labels for each group/slice"
|
|
3870
|
+
},
|
|
3871
|
+
"groupSortOverrides": {
|
|
3872
|
+
"description": "Custom sort order for groups/slices",
|
|
3873
|
+
"items": {
|
|
3874
|
+
"type": "string"
|
|
3875
|
+
},
|
|
3876
|
+
"type": "array"
|
|
3877
|
+
},
|
|
3878
|
+
"groupValueOptionOverrides": {
|
|
3507
3879
|
"$ref": "#/$defs/Record_string.Partial_PieChartValueOptions__",
|
|
3508
3880
|
"description": "Per-slice value display options"
|
|
3509
3881
|
},
|
|
@@ -3634,6 +4006,88 @@
|
|
|
3634
4006
|
"required": ["y"],
|
|
3635
4007
|
"type": "object"
|
|
3636
4008
|
},
|
|
4009
|
+
"PivotConfiguration": {
|
|
4010
|
+
"properties": {
|
|
4011
|
+
"foldOverflowGroups": {
|
|
4012
|
+
"description": "When true, groups past the pivot column limit are not dropped. Their\nvalues are added up per row into one extra \"Other\" pivot column\n(`OTHER_PIVOT_KEY`), so anything summed across the groups, such as a\nstacked bar total, still covers the whole result. Only set for stacked\ncartesian charts whose values are all numeric.",
|
|
4013
|
+
"type": "boolean"
|
|
4014
|
+
},
|
|
4015
|
+
"groupByColumns": {
|
|
4016
|
+
"items": {
|
|
4017
|
+
"$ref": "#/$defs/GroupByColumn"
|
|
4018
|
+
},
|
|
4019
|
+
"type": "array"
|
|
4020
|
+
},
|
|
4021
|
+
"indexColumn": {
|
|
4022
|
+
"anyOf": [
|
|
4023
|
+
{
|
|
4024
|
+
"$ref": "#/$defs/PivotIndexColum"
|
|
4025
|
+
},
|
|
4026
|
+
{
|
|
4027
|
+
"items": {
|
|
4028
|
+
"$ref": "#/$defs/PivotIndexColum"
|
|
4029
|
+
},
|
|
4030
|
+
"type": "array"
|
|
4031
|
+
}
|
|
4032
|
+
]
|
|
4033
|
+
},
|
|
4034
|
+
"metricsAsRows": {
|
|
4035
|
+
"description": "When true, metrics are displayed as rows instead of columns.\nThis affects column limit calculation - when metrics are rows,\nwe don't need to divide the column limit by the number of metrics.\nDefaults to false for backward compatibility (SQL runner behavior).",
|
|
4036
|
+
"type": "boolean"
|
|
4037
|
+
},
|
|
4038
|
+
"passthroughDimensions": {
|
|
4039
|
+
"description": "Hidden pivot-column dimensions that are NOT sort targets but still need\ntheir values carried through the SQL pipeline so that other fields'\n`richText` / `image:` templates can reference them via\n`row.<table>.<field>.raw`. They participate in `group_by_query` SELECT\nand GROUP BY (same as sortOnlyDimensions) but do NOT affect\n`column_ranking` ORDER BY (they don't drive sort). Without this bucket\nthe dim would be dropped entirely from the query and `row.*.raw`\nreferences would silently resolve to undefined.",
|
|
4040
|
+
"items": {
|
|
4041
|
+
"$ref": "#/$defs/GroupByColumn"
|
|
4042
|
+
},
|
|
4043
|
+
"type": "array"
|
|
4044
|
+
},
|
|
4045
|
+
"pivotColumnsOrder": {
|
|
4046
|
+
"description": "Declared order of the pivot-column dimensions (visible `groupByColumns`\nplus hidden `sortOnlyDimensions`) as they appear in the chart's\n`pivotConfig.columns`. `column_ranking` orders columns by this sequence so\na hidden sort-only dim sorts at its DECLARED position — hiding a dim then\nleaves column order identical to when it was visible, instead of hoisting\nthe hidden dim to the front of the ORDER BY. Passthrough (hidden, non-sort)\ndims are excluded since they don't drive sort. When omitted, ordering falls\nback to hoisting sort-only sort targets to the front (legacy behavior).",
|
|
4047
|
+
"items": {
|
|
4048
|
+
"$ref": "#/$defs/GroupByColumn"
|
|
4049
|
+
},
|
|
4050
|
+
"type": "array"
|
|
4051
|
+
},
|
|
4052
|
+
"sortBy": {
|
|
4053
|
+
"$ref": "#/$defs/SortBy"
|
|
4054
|
+
},
|
|
4055
|
+
"sortOnlyColumns": {
|
|
4056
|
+
"description": "Metrics/table calculations needed for sort anchor CTEs but not for display.\nThese are merged into valuesColumns for SQL generation in PivotQueryBuilder,\nbut excluded from pivotDetails so they don't appear as chart series.",
|
|
4057
|
+
"items": {
|
|
4058
|
+
"$ref": "#/$defs/ValuesColumn"
|
|
4059
|
+
},
|
|
4060
|
+
"type": "array"
|
|
4061
|
+
},
|
|
4062
|
+
"sortOnlyDimensions": {
|
|
4063
|
+
"description": "Dimensions referenced by ORDER BY but NOT spread into pivot columns.\nUsed when a user hides a dim that's part of `pivotConfig.columns` and has\na sort entry on it: the dim still ranks column order via the GROUP BY /\nORDER BY pipeline, but it doesn't become a pivot column header level.\nMirrors `sortOnlyColumns` (which serves the same purpose for metrics).",
|
|
4064
|
+
"items": {
|
|
4065
|
+
"$ref": "#/$defs/GroupByColumn"
|
|
4066
|
+
},
|
|
4067
|
+
"type": "array"
|
|
4068
|
+
},
|
|
4069
|
+
"valuesColumns": {
|
|
4070
|
+
"items": {
|
|
4071
|
+
"$ref": "#/$defs/ValuesColumn"
|
|
4072
|
+
},
|
|
4073
|
+
"type": "array"
|
|
4074
|
+
}
|
|
4075
|
+
},
|
|
4076
|
+
"required": ["valuesColumns"],
|
|
4077
|
+
"type": "object"
|
|
4078
|
+
},
|
|
4079
|
+
"PivotIndexColum": {
|
|
4080
|
+
"properties": {
|
|
4081
|
+
"reference": {
|
|
4082
|
+
"type": "string"
|
|
4083
|
+
},
|
|
4084
|
+
"type": {
|
|
4085
|
+
"$ref": "#/$defs/VizIndexType"
|
|
4086
|
+
}
|
|
4087
|
+
},
|
|
4088
|
+
"required": ["type", "reference"],
|
|
4089
|
+
"type": "object"
|
|
4090
|
+
},
|
|
3637
4091
|
"PivotReference": {
|
|
3638
4092
|
"properties": {
|
|
3639
4093
|
"field": {
|
|
@@ -3695,6 +4149,39 @@
|
|
|
3695
4149
|
"required": ["value", "field"],
|
|
3696
4150
|
"type": "object"
|
|
3697
4151
|
},
|
|
4152
|
+
"QueryNodeId": {
|
|
4153
|
+
"description": "A name identifying one query within a multi-query submission. Other queries\nreference this query's results by this name, and by default the results are\nexposed to referencing DuckDB SQL as a table of the same name — so node ids\nshare the table-name grammar.",
|
|
4154
|
+
"pattern": "^[a-zA-Z_][a-zA-Z0-9_]{0,62}$",
|
|
4155
|
+
"type": "string"
|
|
4156
|
+
},
|
|
4157
|
+
"QuerySourceType.DUCKDB": {
|
|
4158
|
+
"enum": ["duckdb"],
|
|
4159
|
+
"type": "string"
|
|
4160
|
+
},
|
|
4161
|
+
"QuerySourceType.MERGE": {
|
|
4162
|
+
"enum": ["merge"],
|
|
4163
|
+
"type": "string"
|
|
4164
|
+
},
|
|
4165
|
+
"QuerySourceType.PYTHON": {
|
|
4166
|
+
"enum": ["python"],
|
|
4167
|
+
"type": "string"
|
|
4168
|
+
},
|
|
4169
|
+
"QuerySourceType.SEMANTIC_LAYER": {
|
|
4170
|
+
"enum": ["semanticLayer"],
|
|
4171
|
+
"type": "string"
|
|
4172
|
+
},
|
|
4173
|
+
"QuerySourceType.SQL": {
|
|
4174
|
+
"enum": ["sql"],
|
|
4175
|
+
"type": "string"
|
|
4176
|
+
},
|
|
4177
|
+
"Record_QuerySourceTableName.QueryResultReference_": {
|
|
4178
|
+
"additionalProperties": {
|
|
4179
|
+
"type": "string"
|
|
4180
|
+
},
|
|
4181
|
+
"description": "Construct a type with a set of properties K of type T",
|
|
4182
|
+
"properties": {},
|
|
4183
|
+
"type": "object"
|
|
4184
|
+
},
|
|
3698
4185
|
"Record_string.boolean_": {
|
|
3699
4186
|
"additionalProperties": {
|
|
3700
4187
|
"type": "boolean"
|
|
@@ -4071,6 +4558,113 @@
|
|
|
4071
4558
|
],
|
|
4072
4559
|
"description": "A persisted merge source.\n\nThe chart source is a reference: its metric query already lives on the chart\nversion. Every additional source owns its query. This keeps one source of\ntruth while allowing more sources without adding `thirdQuery`, `fourthQuery`,\nand so on."
|
|
4073
4560
|
},
|
|
4561
|
+
"SemanticLayerSourceQuery": {
|
|
4562
|
+
"description": "A semantic layer (metric) query as a source query. Only exploreName,\ndimensions and metrics are required; everything else defaults to empty\n(no filters, no sorts, no table calculations) and a default row limit.\n\nResult columns are named by field id — exactly the dimensions and metrics\nrequested (e.g. requesting metric \"payments_total_revenue\" yields a column\n\"payments_total_revenue\"), so referencing DuckDB SQL selects those names.",
|
|
4563
|
+
"properties": {
|
|
4564
|
+
"additionalMetrics": {
|
|
4565
|
+
"description": "Ad-hoc metrics not defined in the explore.",
|
|
4566
|
+
"items": {
|
|
4567
|
+
"$ref": "#/$defs/AdditionalMetric"
|
|
4568
|
+
},
|
|
4569
|
+
"type": "array"
|
|
4570
|
+
},
|
|
4571
|
+
"customDimensions": {
|
|
4572
|
+
"description": "Ad-hoc dimensions not defined in the explore.",
|
|
4573
|
+
"items": {
|
|
4574
|
+
"$ref": "#/$defs/CustomDimension"
|
|
4575
|
+
},
|
|
4576
|
+
"type": "array"
|
|
4577
|
+
},
|
|
4578
|
+
"description": {
|
|
4579
|
+
"description": "One-line note on what this query does, shown under the title.",
|
|
4580
|
+
"type": "string"
|
|
4581
|
+
},
|
|
4582
|
+
"dimensionOverrides": {
|
|
4583
|
+
"$ref": "#/$defs/DimensionOverrides",
|
|
4584
|
+
"description": "Formatting overrides for dimensions in this query, keyed by field id."
|
|
4585
|
+
},
|
|
4586
|
+
"dimensions": {
|
|
4587
|
+
"description": "Dimension field ids to group by, from the explore's schema.",
|
|
4588
|
+
"items": {
|
|
4589
|
+
"$ref": "#/$defs/FieldId"
|
|
4590
|
+
},
|
|
4591
|
+
"type": "array"
|
|
4592
|
+
},
|
|
4593
|
+
"exploreName": {
|
|
4594
|
+
"type": "string"
|
|
4595
|
+
},
|
|
4596
|
+
"filters": {
|
|
4597
|
+
"description": "Filters to apply, in the metric query filters shape: an optional filter\ngroup per field kind, e.g. {\"dimensions\": {\"id\": \"...\", \"and\": [{\"id\":\n\"...\", \"target\": {\"fieldId\": \"orders_status\"}, \"operator\": \"equals\",\n\"values\": [\"completed\"]}]}}. Defaults to no filters.",
|
|
4598
|
+
"properties": {
|
|
4599
|
+
"dimensions": {
|
|
4600
|
+
"$ref": "#/$defs/AnyType"
|
|
4601
|
+
},
|
|
4602
|
+
"metrics": {
|
|
4603
|
+
"$ref": "#/$defs/AnyType"
|
|
4604
|
+
},
|
|
4605
|
+
"tableCalculations": {
|
|
4606
|
+
"$ref": "#/$defs/AnyType"
|
|
4607
|
+
}
|
|
4608
|
+
},
|
|
4609
|
+
"type": "object"
|
|
4610
|
+
},
|
|
4611
|
+
"limit": {
|
|
4612
|
+
"description": "Max rows to return. Defaults to the standard query row limit.",
|
|
4613
|
+
"format": "double",
|
|
4614
|
+
"type": "number"
|
|
4615
|
+
},
|
|
4616
|
+
"metricOverrides": {
|
|
4617
|
+
"$ref": "#/$defs/MetricOverrides",
|
|
4618
|
+
"description": "Formatting overrides for metrics in this query, keyed by field id."
|
|
4619
|
+
},
|
|
4620
|
+
"metrics": {
|
|
4621
|
+
"description": "Metric field ids to compute, from the explore's schema.",
|
|
4622
|
+
"items": {
|
|
4623
|
+
"$ref": "#/$defs/FieldId"
|
|
4624
|
+
},
|
|
4625
|
+
"type": "array"
|
|
4626
|
+
},
|
|
4627
|
+
"nodeId": {
|
|
4628
|
+
"$ref": "#/$defs/QueryNodeId",
|
|
4629
|
+
"description": "Names this query so other queries in the same submission can reference its results."
|
|
4630
|
+
},
|
|
4631
|
+
"parameters": {
|
|
4632
|
+
"$ref": "#/$defs/ParametersValuesMap",
|
|
4633
|
+
"description": "Parameter values for this query, layered over the submission's parameters."
|
|
4634
|
+
},
|
|
4635
|
+
"pivotConfiguration": {
|
|
4636
|
+
"$ref": "#/$defs/PivotConfiguration",
|
|
4637
|
+
"description": "Pivots this node's result the way a pivoted chart does. Honoured by\nsemanticLayer, sql and duckdb nodes; external nodes refuse it."
|
|
4638
|
+
},
|
|
4639
|
+
"sorts": {
|
|
4640
|
+
"description": "Sorts to apply, e.g. [{\"fieldId\": \"orders_order_date\", \"descending\": true}]. Defaults to none.",
|
|
4641
|
+
"items": {
|
|
4642
|
+
"$ref": "#/$defs/SortField"
|
|
4643
|
+
},
|
|
4644
|
+
"type": "array"
|
|
4645
|
+
},
|
|
4646
|
+
"sourceType": {
|
|
4647
|
+
"$ref": "#/$defs/QuerySourceType.SEMANTIC_LAYER"
|
|
4648
|
+
},
|
|
4649
|
+
"tableCalculations": {
|
|
4650
|
+
"description": "Table calculations appended to the results. Defaults to none.",
|
|
4651
|
+
"items": {
|
|
4652
|
+
"$ref": "#/$defs/TableCalculation"
|
|
4653
|
+
},
|
|
4654
|
+
"type": "array"
|
|
4655
|
+
},
|
|
4656
|
+
"timezone": {
|
|
4657
|
+
"description": "IANA timezone for time dimension bucketing, e.g. \"America/New_York\".",
|
|
4658
|
+
"type": "string"
|
|
4659
|
+
},
|
|
4660
|
+
"title": {
|
|
4661
|
+
"description": "Plain-language label shown to users instead of the node id. Optional: the public query-sources API accepts and ignores it.",
|
|
4662
|
+
"type": "string"
|
|
4663
|
+
}
|
|
4664
|
+
},
|
|
4665
|
+
"required": ["metrics", "dimensions", "exploreName", "sourceType"],
|
|
4666
|
+
"type": "object"
|
|
4667
|
+
},
|
|
4074
4668
|
"Series": {
|
|
4075
4669
|
"properties": {
|
|
4076
4670
|
"areaStyle": {
|
|
@@ -4206,6 +4800,12 @@
|
|
|
4206
4800
|
"required": ["color"],
|
|
4207
4801
|
"type": "object"
|
|
4208
4802
|
},
|
|
4803
|
+
"SortBy": {
|
|
4804
|
+
"items": {
|
|
4805
|
+
"$ref": "#/$defs/VizSortBy"
|
|
4806
|
+
},
|
|
4807
|
+
"type": "array"
|
|
4808
|
+
},
|
|
4209
4809
|
"SortByDirection": {
|
|
4210
4810
|
"enum": ["ASC", "DESC"],
|
|
4211
4811
|
"type": "string"
|
|
@@ -4305,6 +4905,39 @@
|
|
|
4305
4905
|
],
|
|
4306
4906
|
"type": "object"
|
|
4307
4907
|
},
|
|
4908
|
+
"SqlSourceQuery": {
|
|
4909
|
+
"description": "A raw warehouse SQL query as a source query.",
|
|
4910
|
+
"properties": {
|
|
4911
|
+
"description": {
|
|
4912
|
+
"description": "One-line note on what this query does, shown under the title.",
|
|
4913
|
+
"type": "string"
|
|
4914
|
+
},
|
|
4915
|
+
"limit": {
|
|
4916
|
+
"format": "double",
|
|
4917
|
+
"type": "number"
|
|
4918
|
+
},
|
|
4919
|
+
"nodeId": {
|
|
4920
|
+
"$ref": "#/$defs/QueryNodeId",
|
|
4921
|
+
"description": "Names this query so other queries in the same submission can reference its results."
|
|
4922
|
+
},
|
|
4923
|
+
"pivotConfiguration": {
|
|
4924
|
+
"$ref": "#/$defs/PivotConfiguration",
|
|
4925
|
+
"description": "Pivots this node's result the way a pivoted chart does. Honoured by\nsemanticLayer, sql and duckdb nodes; external nodes refuse it."
|
|
4926
|
+
},
|
|
4927
|
+
"sourceType": {
|
|
4928
|
+
"$ref": "#/$defs/QuerySourceType.SQL"
|
|
4929
|
+
},
|
|
4930
|
+
"sql": {
|
|
4931
|
+
"type": "string"
|
|
4932
|
+
},
|
|
4933
|
+
"title": {
|
|
4934
|
+
"description": "Plain-language label shown to users instead of the node id. Optional: the public query-sources API accepts and ignores it.",
|
|
4935
|
+
"type": "string"
|
|
4936
|
+
}
|
|
4937
|
+
},
|
|
4938
|
+
"required": ["sql", "sourceType"],
|
|
4939
|
+
"type": "object"
|
|
4940
|
+
},
|
|
4308
4941
|
"SqlTableCalculation": {
|
|
4309
4942
|
"allOf": [
|
|
4310
4943
|
{
|
|
@@ -4326,6 +4959,106 @@
|
|
|
4326
4959
|
"enum": ["none", "stack", "stack100"],
|
|
4327
4960
|
"type": "string"
|
|
4328
4961
|
},
|
|
4962
|
+
"StoredNode_DuckdbSourceQuery_": {
|
|
4963
|
+
"allOf": [
|
|
4964
|
+
{
|
|
4965
|
+
"$ref": "#/$defs/DuckdbSourceQuery"
|
|
4966
|
+
},
|
|
4967
|
+
{
|
|
4968
|
+
"properties": {
|
|
4969
|
+
"nodeId": {
|
|
4970
|
+
"pattern": "^[a-zA-Z_][a-zA-Z0-9_]{0,62}$",
|
|
4971
|
+
"type": "string"
|
|
4972
|
+
},
|
|
4973
|
+
"title": {
|
|
4974
|
+
"type": "string"
|
|
4975
|
+
}
|
|
4976
|
+
},
|
|
4977
|
+
"required": ["title", "nodeId"],
|
|
4978
|
+
"type": "object"
|
|
4979
|
+
}
|
|
4980
|
+
]
|
|
4981
|
+
},
|
|
4982
|
+
"StoredNode_Omit_MergeSourceQuery.pivotConfiguration__": {
|
|
4983
|
+
"allOf": [
|
|
4984
|
+
{
|
|
4985
|
+
"$ref": "#/$defs/Omit_MergeSourceQuery.pivotConfiguration_"
|
|
4986
|
+
},
|
|
4987
|
+
{
|
|
4988
|
+
"properties": {
|
|
4989
|
+
"nodeId": {
|
|
4990
|
+
"pattern": "^[a-zA-Z_][a-zA-Z0-9_]{0,62}$",
|
|
4991
|
+
"type": "string"
|
|
4992
|
+
},
|
|
4993
|
+
"title": {
|
|
4994
|
+
"type": "string"
|
|
4995
|
+
}
|
|
4996
|
+
},
|
|
4997
|
+
"required": ["title", "nodeId"],
|
|
4998
|
+
"type": "object"
|
|
4999
|
+
}
|
|
5000
|
+
]
|
|
5001
|
+
},
|
|
5002
|
+
"StoredNode_Omit_PythonSourceQuery.pivotConfiguration__": {
|
|
5003
|
+
"allOf": [
|
|
5004
|
+
{
|
|
5005
|
+
"$ref": "#/$defs/Omit_PythonSourceQuery.pivotConfiguration_"
|
|
5006
|
+
},
|
|
5007
|
+
{
|
|
5008
|
+
"properties": {
|
|
5009
|
+
"nodeId": {
|
|
5010
|
+
"pattern": "^[a-zA-Z_][a-zA-Z0-9_]{0,62}$",
|
|
5011
|
+
"type": "string"
|
|
5012
|
+
},
|
|
5013
|
+
"title": {
|
|
5014
|
+
"type": "string"
|
|
5015
|
+
}
|
|
5016
|
+
},
|
|
5017
|
+
"required": ["title", "nodeId"],
|
|
5018
|
+
"type": "object"
|
|
5019
|
+
}
|
|
5020
|
+
]
|
|
5021
|
+
},
|
|
5022
|
+
"StoredNode_SemanticLayerSourceQuery_": {
|
|
5023
|
+
"allOf": [
|
|
5024
|
+
{
|
|
5025
|
+
"$ref": "#/$defs/SemanticLayerSourceQuery"
|
|
5026
|
+
},
|
|
5027
|
+
{
|
|
5028
|
+
"properties": {
|
|
5029
|
+
"nodeId": {
|
|
5030
|
+
"pattern": "^[a-zA-Z_][a-zA-Z0-9_]{0,62}$",
|
|
5031
|
+
"type": "string"
|
|
5032
|
+
},
|
|
5033
|
+
"title": {
|
|
5034
|
+
"type": "string"
|
|
5035
|
+
}
|
|
5036
|
+
},
|
|
5037
|
+
"required": ["title", "nodeId"],
|
|
5038
|
+
"type": "object"
|
|
5039
|
+
}
|
|
5040
|
+
]
|
|
5041
|
+
},
|
|
5042
|
+
"StoredNode_SqlSourceQuery_": {
|
|
5043
|
+
"allOf": [
|
|
5044
|
+
{
|
|
5045
|
+
"$ref": "#/$defs/SqlSourceQuery"
|
|
5046
|
+
},
|
|
5047
|
+
{
|
|
5048
|
+
"properties": {
|
|
5049
|
+
"nodeId": {
|
|
5050
|
+
"pattern": "^[a-zA-Z_][a-zA-Z0-9_]{0,62}$",
|
|
5051
|
+
"type": "string"
|
|
5052
|
+
},
|
|
5053
|
+
"title": {
|
|
5054
|
+
"type": "string"
|
|
5055
|
+
}
|
|
5056
|
+
},
|
|
5057
|
+
"required": ["title", "nodeId"],
|
|
5058
|
+
"type": "object"
|
|
5059
|
+
}
|
|
5060
|
+
]
|
|
5061
|
+
},
|
|
4329
5062
|
"TableCalculation": {
|
|
4330
5063
|
"anyOf": [
|
|
4331
5064
|
{
|
|
@@ -4832,6 +5565,18 @@
|
|
|
4832
5565
|
"enum": ["hidden", "top", "bottom", "left", "right", "inside"],
|
|
4833
5566
|
"type": "string"
|
|
4834
5567
|
},
|
|
5568
|
+
"ValuesColumn": {
|
|
5569
|
+
"properties": {
|
|
5570
|
+
"aggregation": {
|
|
5571
|
+
"$ref": "#/$defs/VizAggregationOptions"
|
|
5572
|
+
},
|
|
5573
|
+
"reference": {
|
|
5574
|
+
"type": "string"
|
|
5575
|
+
}
|
|
5576
|
+
},
|
|
5577
|
+
"required": ["aggregation", "reference"],
|
|
5578
|
+
"type": "object"
|
|
5579
|
+
},
|
|
4835
5580
|
"VizAggregationOptions": {
|
|
4836
5581
|
"enum": ["sum", "count", "avg", "min", "max", "any"],
|
|
4837
5582
|
"type": "string"
|
|
@@ -5191,37 +5936,50 @@
|
|
|
5191
5936
|
},
|
|
5192
5937
|
"$id": "https://schemas.lightdash.com/lightdash/chart-as-code.json",
|
|
5193
5938
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
5194
|
-
"description": "Schema for defining Lightdash charts (semantic layer
|
|
5939
|
+
"description": "Schema for defining Lightdash charts (semantic layer, SQL and composer charts) in YAML format for version control",
|
|
5195
5940
|
"else": {
|
|
5196
|
-
"
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
"
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
"
|
|
5203
|
-
"
|
|
5204
|
-
|
|
5205
|
-
},
|
|
5206
|
-
"required": ["contentType"]
|
|
5207
|
-
},
|
|
5208
|
-
{
|
|
5209
|
-
"not": {
|
|
5210
|
-
"anyOf": [
|
|
5211
|
-
{
|
|
5212
|
-
"required": ["contentType"]
|
|
5213
|
-
},
|
|
5214
|
-
{
|
|
5215
|
-
"required": ["tableName"]
|
|
5941
|
+
"else": {
|
|
5942
|
+
"$ref": "#/$defs/ChartAsCode"
|
|
5943
|
+
},
|
|
5944
|
+
"if": {
|
|
5945
|
+
"anyOf": [
|
|
5946
|
+
{
|
|
5947
|
+
"properties": {
|
|
5948
|
+
"contentType": {
|
|
5949
|
+
"const": "sql_chart"
|
|
5216
5950
|
}
|
|
5217
|
-
|
|
5951
|
+
},
|
|
5952
|
+
"required": ["contentType"]
|
|
5218
5953
|
},
|
|
5219
|
-
|
|
5954
|
+
{
|
|
5955
|
+
"not": {
|
|
5956
|
+
"anyOf": [
|
|
5957
|
+
{
|
|
5958
|
+
"required": ["contentType"]
|
|
5959
|
+
},
|
|
5960
|
+
{
|
|
5961
|
+
"required": ["tableName"]
|
|
5962
|
+
}
|
|
5963
|
+
]
|
|
5964
|
+
},
|
|
5965
|
+
"required": ["sql"]
|
|
5966
|
+
}
|
|
5967
|
+
]
|
|
5968
|
+
},
|
|
5969
|
+
"then": {
|
|
5970
|
+
"$ref": "#/$defs/SqlChartAsCode"
|
|
5971
|
+
}
|
|
5972
|
+
},
|
|
5973
|
+
"if": {
|
|
5974
|
+
"properties": {
|
|
5975
|
+
"contentType": {
|
|
5976
|
+
"const": "composer_chart"
|
|
5220
5977
|
}
|
|
5221
|
-
|
|
5978
|
+
},
|
|
5979
|
+
"required": ["contentType"]
|
|
5222
5980
|
},
|
|
5223
5981
|
"then": {
|
|
5224
|
-
"$ref": "#/$defs/
|
|
5982
|
+
"$ref": "#/$defs/ComposerChartAsCode"
|
|
5225
5983
|
},
|
|
5226
5984
|
"title": "Lightdash Chart as Code",
|
|
5227
5985
|
"type": "object"
|