@finos/legend-cube-builder 0.0.4 → 0.0.5
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/README.md +9 -3
- package/docs/adding-an-operation.md +22 -12
- package/docs/demo/DEMO-FAST-NOTES.md +67 -0
- package/docs/demo/README.md +102 -0
- package/docs/demo/specs/duckdb-sales-pivot.cube.json +110 -0
- package/docs/demo/specs/trades-desks-1-joined.cube.json +123 -0
- package/docs/demo/specs/trades-desks-2-grouped.cube.json +140 -0
- package/docs/demo/specs/trades-desks-3-ranked.cube.json +158 -0
- package/docs/demo/specs/trades-desks-4-extended.cube.json +208 -0
- package/docs/demo/specs/trades-desks-5-final.cube.json +248 -0
- package/docs/hosting.md +50 -3
- package/docs/testing.md +32 -0
- package/lib/__lib__/LegendCubeCommand.d.ts +2 -0
- package/lib/__lib__/LegendCubeCommand.d.ts.map +1 -1
- package/lib/__lib__/LegendCubeCommand.js +7 -0
- package/lib/__lib__/LegendCubeCommand.js.map +1 -1
- package/lib/__lib__/LegendCubeFunctionLabels.d.ts +29 -0
- package/lib/__lib__/LegendCubeFunctionLabels.d.ts.map +1 -0
- package/lib/__lib__/LegendCubeFunctionLabels.js +31 -0
- package/lib/__lib__/LegendCubeFunctionLabels.js.map +1 -0
- package/lib/__lib__/LegendCubeHelpText.d.ts +5 -1
- package/lib/__lib__/LegendCubeHelpText.d.ts.map +1 -1
- package/lib/__lib__/LegendCubeHelpText.js +14 -2
- package/lib/__lib__/LegendCubeHelpText.js.map +1 -1
- package/lib/__lib__/LegendCubeLabels.d.ts +100 -8
- package/lib/__lib__/LegendCubeLabels.d.ts.map +1 -1
- package/lib/__lib__/LegendCubeLabels.js +129 -14
- package/lib/__lib__/LegendCubeLabels.js.map +1 -1
- package/lib/__lib__/LegendCubeProjectSourceLabels.d.ts +26 -0
- package/lib/__lib__/LegendCubeProjectSourceLabels.d.ts.map +1 -0
- package/lib/__lib__/LegendCubeProjectSourceLabels.js +26 -0
- package/lib/__lib__/LegendCubeProjectSourceLabels.js.map +1 -0
- package/lib/__lib__/LegendCubeServiceLabels.d.ts +27 -0
- package/lib/__lib__/LegendCubeServiceLabels.d.ts.map +1 -0
- package/lib/__lib__/LegendCubeServiceLabels.js +32 -0
- package/lib/__lib__/LegendCubeServiceLabels.js.map +1 -0
- package/lib/__lib__/LegendCubeTesting.d.ts +7 -0
- package/lib/__lib__/LegendCubeTesting.d.ts.map +1 -1
- package/lib/__lib__/LegendCubeTesting.js +7 -0
- package/lib/__lib__/LegendCubeTesting.js.map +1 -1
- package/lib/__test-utils__/CubeEngineTestSupport.d.ts +1 -1
- package/lib/__test-utils__/CubeEngineTestSupport.d.ts.map +1 -1
- package/lib/__test-utils__/CubeEngineTestSupport.js +2 -2
- package/lib/__test-utils__/CubeEngineTestSupport.js.map +1 -1
- package/lib/__test-utils__/CubeExpressionTestUtils.d.ts +8 -1
- package/lib/__test-utils__/CubeExpressionTestUtils.d.ts.map +1 -1
- package/lib/__test-utils__/CubeExpressionTestUtils.js +20 -3
- package/lib/__test-utils__/CubeExpressionTestUtils.js.map +1 -1
- package/lib/__test-utils__/CubeFunctionTestOutline.d.ts +26 -0
- package/lib/__test-utils__/CubeFunctionTestOutline.d.ts.map +1 -0
- package/lib/__test-utils__/CubeFunctionTestOutline.js +56 -0
- package/lib/__test-utils__/CubeFunctionTestOutline.js.map +1 -0
- package/lib/__test-utils__/CubeLambdaCorpus.d.ts +36 -0
- package/lib/__test-utils__/CubeLambdaCorpus.d.ts.map +1 -0
- package/lib/__test-utils__/CubeLambdaCorpus.js +83 -0
- package/lib/__test-utils__/CubeLambdaCorpus.js.map +1 -0
- package/lib/__test-utils__/CubePageTestUtils.d.ts +6 -0
- package/lib/__test-utils__/CubePageTestUtils.d.ts.map +1 -1
- package/lib/__test-utils__/CubePageTestUtils.js +21 -0
- package/lib/__test-utils__/CubePageTestUtils.js.map +1 -1
- package/lib/__test-utils__/CubeTestApplication.d.ts +9 -0
- package/lib/__test-utils__/CubeTestApplication.d.ts.map +1 -1
- package/lib/__test-utils__/CubeTestApplication.js +16 -0
- package/lib/__test-utils__/CubeTestApplication.js.map +1 -1
- package/lib/__test-utils__/FakeCubeEngine.d.ts +5 -0
- package/lib/__test-utils__/FakeCubeEngine.d.ts.map +1 -1
- package/lib/__test-utils__/FakeCubeEngine.js +17 -0
- package/lib/__test-utils__/FakeCubeEngine.js.map +1 -1
- package/lib/__test-utils__/FakeCubeIngestCatalog.d.ts +7 -1
- package/lib/__test-utils__/FakeCubeIngestCatalog.d.ts.map +1 -1
- package/lib/__test-utils__/FakeCubeIngestCatalog.js +16 -0
- package/lib/__test-utils__/FakeCubeIngestCatalog.js.map +1 -1
- package/lib/__test-utils__/FakeCubeServiceCatalog.d.ts +26 -0
- package/lib/__test-utils__/FakeCubeServiceCatalog.d.ts.map +1 -0
- package/lib/__test-utils__/FakeCubeServiceCatalog.js +40 -0
- package/lib/__test-utils__/FakeCubeServiceCatalog.js.map +1 -0
- package/lib/components/CubeAddItems.d.ts.map +1 -1
- package/lib/components/CubeAddItems.js +9 -6
- package/lib/components/CubeAddItems.js.map +1 -1
- package/lib/components/CubeDialogTheme.d.ts +25 -0
- package/lib/components/CubeDialogTheme.d.ts.map +1 -0
- package/lib/components/CubeDialogTheme.js +25 -0
- package/lib/components/CubeDialogTheme.js.map +1 -0
- package/lib/components/CubeEditor.d.ts +12 -1
- package/lib/components/CubeEditor.d.ts.map +1 -1
- package/lib/components/CubeEditor.js +16 -14
- package/lib/components/CubeEditor.js.map +1 -1
- package/lib/components/CubeFileMenu.d.ts +28 -0
- package/lib/components/CubeFileMenu.d.ts.map +1 -0
- package/lib/components/CubeFileMenu.js +77 -0
- package/lib/components/CubeFileMenu.js.map +1 -0
- package/lib/components/CubeLambdaImportBanner.d.ts +26 -0
- package/lib/components/CubeLambdaImportBanner.d.ts.map +1 -0
- package/lib/components/CubeLambdaImportBanner.js +47 -0
- package/lib/components/CubeLambdaImportBanner.js.map +1 -0
- package/lib/components/CubeNodeIcon.d.ts.map +1 -1
- package/lib/components/CubeNodeIcon.js +5 -1
- package/lib/components/CubeNodeIcon.js.map +1 -1
- package/lib/components/CubeSchemaColumnsTable.d.ts.map +1 -1
- package/lib/components/CubeSchemaColumnsTable.js +2 -2
- package/lib/components/CubeSchemaColumnsTable.js.map +1 -1
- package/lib/components/canvas/CubeCanvas.d.ts.map +1 -1
- package/lib/components/canvas/CubeCanvas.js +38 -5
- package/lib/components/canvas/CubeCanvas.js.map +1 -1
- package/lib/components/canvas/CubeCanvasContextMenu.d.ts.map +1 -1
- package/lib/components/canvas/CubeCanvasContextMenu.js +2 -1
- package/lib/components/canvas/CubeCanvasContextMenu.js.map +1 -1
- package/lib/components/canvas/CubeCanvasElements.d.ts +18 -1
- package/lib/components/canvas/CubeCanvasElements.d.ts.map +1 -1
- package/lib/components/canvas/CubeCanvasElements.js +58 -3
- package/lib/components/canvas/CubeCanvasElements.js.map +1 -1
- package/lib/components/canvas/CubeCanvasLayout.js +1 -1
- package/lib/components/canvas/CubeCanvasNode.d.ts.map +1 -1
- package/lib/components/canvas/CubeCanvasNode.js +8 -4
- package/lib/components/canvas/CubeCanvasNode.js.map +1 -1
- package/lib/components/dev-settings/CubeDevSettings.d.ts +35 -0
- package/lib/components/dev-settings/CubeDevSettings.d.ts.map +1 -0
- package/lib/components/dev-settings/CubeDevSettings.js +50 -0
- package/lib/components/dev-settings/CubeDevSettings.js.map +1 -0
- package/lib/components/editors/CubeColumnChecklist.d.ts.map +1 -1
- package/lib/components/editors/CubeColumnChecklist.js +2 -2
- package/lib/components/editors/CubeColumnChecklist.js.map +1 -1
- package/lib/components/editors/CubeColumnPicker.d.ts.map +1 -1
- package/lib/components/editors/CubeColumnPicker.js +3 -3
- package/lib/components/editors/CubeColumnPicker.js.map +1 -1
- package/lib/components/editors/CubeConcatEditor.js +2 -2
- package/lib/components/editors/CubeConcatEditor.js.map +1 -1
- package/lib/components/editors/CubeExpressionFilterEditor.d.ts +25 -0
- package/lib/components/editors/CubeExpressionFilterEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeExpressionFilterEditor.js +83 -0
- package/lib/components/editors/CubeExpressionFilterEditor.js.map +1 -0
- package/lib/components/editors/CubeExtendEditor.d.ts +2 -0
- package/lib/components/editors/CubeExtendEditor.d.ts.map +1 -1
- package/lib/components/editors/CubeExtendEditor.js +3 -3
- package/lib/components/editors/CubeExtendEditor.js.map +1 -1
- package/lib/components/editors/CubeFilterEditor.d.ts.map +1 -1
- package/lib/components/editors/CubeFilterEditor.js +13 -2
- package/lib/components/editors/CubeFilterEditor.js.map +1 -1
- package/lib/components/editors/CubeFunctionSourceEditor.d.ts +25 -0
- package/lib/components/editors/CubeFunctionSourceEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeFunctionSourceEditor.js +55 -0
- package/lib/components/editors/CubeFunctionSourceEditor.js.map +1 -0
- package/lib/components/editors/CubeJoinEditor.d.ts.map +1 -1
- package/lib/components/editors/CubeJoinEditor.js +16 -4
- package/lib/components/editors/CubeJoinEditor.js.map +1 -1
- package/lib/components/editors/CubeNodeEditorPanel.d.ts.map +1 -1
- package/lib/components/editors/CubeNodeEditorPanel.js +18 -8
- package/lib/components/editors/CubeNodeEditorPanel.js.map +1 -1
- package/lib/components/editors/CubeNodeEditorPopper.d.ts +5 -1
- package/lib/components/editors/CubeNodeEditorPopper.d.ts.map +1 -1
- package/lib/components/editors/CubeNodeEditorPopper.js +10 -2
- package/lib/components/editors/CubeNodeEditorPopper.js.map +1 -1
- package/lib/components/editors/CubeNodeEditorRegistry.d.ts.map +1 -1
- package/lib/components/editors/CubeNodeEditorRegistry.js +9 -1
- package/lib/components/editors/CubeNodeEditorRegistry.js.map +1 -1
- package/lib/components/editors/CubePivotEditor.d.ts +26 -0
- package/lib/components/editors/CubePivotEditor.d.ts.map +1 -0
- package/lib/components/editors/CubePivotEditor.js +93 -0
- package/lib/components/editors/CubePivotEditor.js.map +1 -0
- package/lib/components/editors/CubeRestrictEditor.d.ts.map +1 -1
- package/lib/components/editors/CubeRestrictEditor.js +2 -2
- package/lib/components/editors/CubeRestrictEditor.js.map +1 -1
- package/lib/components/editors/CubeServiceSourceEditor.d.ts +25 -0
- package/lib/components/editors/CubeServiceSourceEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeServiceSourceEditor.js +41 -0
- package/lib/components/editors/CubeServiceSourceEditor.js.map +1 -0
- package/lib/components/grid/CubeColumnFormatDialog.d.ts +28 -0
- package/lib/components/grid/CubeColumnFormatDialog.d.ts.map +1 -0
- package/lib/components/grid/CubeColumnFormatDialog.js +94 -0
- package/lib/components/grid/CubeColumnFormatDialog.js.map +1 -0
- package/lib/components/grid/CubeDrilldownBar.d.ts +37 -0
- package/lib/components/grid/CubeDrilldownBar.d.ts.map +1 -0
- package/lib/components/grid/CubeDrilldownBar.js +77 -0
- package/lib/components/grid/CubeDrilldownBar.js.map +1 -0
- package/lib/components/grid/CubeGridRegion.d.ts.map +1 -1
- package/lib/components/grid/CubeGridRegion.js +40 -26
- package/lib/components/grid/CubeGridRegion.js.map +1 -1
- package/lib/components/grid/CubeGridValues.d.ts +31 -1
- package/lib/components/grid/CubeGridValues.d.ts.map +1 -1
- package/lib/components/grid/CubeGridValues.js +108 -1
- package/lib/components/grid/CubeGridValues.js.map +1 -1
- package/lib/components/grid/CubeResultGrid.d.ts +68 -5
- package/lib/components/grid/CubeResultGrid.d.ts.map +1 -1
- package/lib/components/grid/CubeResultGrid.js +308 -35
- package/lib/components/grid/CubeResultGrid.js.map +1 -1
- package/lib/components/grid/CubeRunStatsPanel.d.ts +28 -0
- package/lib/components/grid/CubeRunStatsPanel.d.ts.map +1 -0
- package/lib/components/grid/CubeRunStatsPanel.js +61 -0
- package/lib/components/grid/CubeRunStatsPanel.js.map +1 -0
- package/lib/components/grid/CubeServerSideGrid.d.ts +36 -0
- package/lib/components/grid/CubeServerSideGrid.d.ts.map +1 -0
- package/lib/components/grid/CubeServerSideGrid.js +114 -0
- package/lib/components/grid/CubeServerSideGrid.js.map +1 -0
- package/lib/components/grid/CubeSqlDialog.d.ts +24 -0
- package/lib/components/grid/CubeSqlDialog.d.ts.map +1 -0
- package/lib/components/grid/CubeSqlDialog.js +39 -0
- package/lib/components/grid/CubeSqlDialog.js.map +1 -0
- package/lib/components/grid/CubeSqlFormat.d.ts +20 -0
- package/lib/components/grid/CubeSqlFormat.d.ts.map +1 -0
- package/lib/components/grid/CubeSqlFormat.js +32 -0
- package/lib/components/grid/CubeSqlFormat.js.map +1 -0
- package/lib/components/palette/CubePalette.d.ts.map +1 -1
- package/lib/components/palette/CubePalette.js +32 -13
- package/lib/components/palette/CubePalette.js.map +1 -1
- package/lib/components/show-pure/CubeShowPureDialog.d.ts +4 -1
- package/lib/components/show-pure/CubeShowPureDialog.d.ts.map +1 -1
- package/lib/components/show-pure/CubeShowPureDialog.js +8 -4
- package/lib/components/show-pure/CubeShowPureDialog.js.map +1 -1
- package/lib/components/source-picker/CubeDataProductTab.d.ts.map +1 -1
- package/lib/components/source-picker/CubeDataProductTab.js +37 -16
- package/lib/components/source-picker/CubeDataProductTab.js.map +1 -1
- package/lib/components/source-picker/CubeDirectConnectionTab.d.ts.map +1 -1
- package/lib/components/source-picker/CubeDirectConnectionTab.js +6 -4
- package/lib/components/source-picker/CubeDirectConnectionTab.js.map +1 -1
- package/lib/components/source-picker/CubeFunctionSteps.d.ts +36 -0
- package/lib/components/source-picker/CubeFunctionSteps.d.ts.map +1 -0
- package/lib/components/source-picker/CubeFunctionSteps.js +76 -0
- package/lib/components/source-picker/CubeFunctionSteps.js.map +1 -0
- package/lib/components/source-picker/CubeIngestTab.d.ts.map +1 -1
- package/lib/components/source-picker/CubeIngestTab.js +39 -16
- package/lib/components/source-picker/CubeIngestTab.js.map +1 -1
- package/lib/components/source-picker/CubeInlineModelTab.d.ts +3 -2
- package/lib/components/source-picker/CubeInlineModelTab.d.ts.map +1 -1
- package/lib/components/source-picker/CubeInlineModelTab.js +23 -13
- package/lib/components/source-picker/CubeInlineModelTab.js.map +1 -1
- package/lib/components/source-picker/CubePickerListItem.d.ts +47 -0
- package/lib/components/source-picker/CubePickerListItem.d.ts.map +1 -0
- package/lib/components/source-picker/CubePickerListItem.js +62 -0
- package/lib/components/source-picker/CubePickerListItem.js.map +1 -0
- package/lib/components/source-picker/CubeProjectTab.d.ts +4 -3
- package/lib/components/source-picker/CubeProjectTab.d.ts.map +1 -1
- package/lib/components/source-picker/CubeProjectTab.js +7 -4
- package/lib/components/source-picker/CubeProjectTab.js.map +1 -1
- package/lib/components/source-picker/CubeServiceTab.d.ts +27 -0
- package/lib/components/source-picker/CubeServiceTab.d.ts.map +1 -0
- package/lib/components/source-picker/CubeServiceTab.js +36 -0
- package/lib/components/source-picker/CubeServiceTab.js.map +1 -0
- package/lib/components/source-picker/CubeSourcePicker.d.ts.map +1 -1
- package/lib/components/source-picker/CubeSourcePicker.js +16 -3
- package/lib/components/source-picker/CubeSourcePicker.js.map +1 -1
- package/lib/components/source-picker/CubeTablePreview.d.ts +29 -0
- package/lib/components/source-picker/CubeTablePreview.d.ts.map +1 -0
- package/lib/components/source-picker/CubeTablePreview.js +10 -0
- package/lib/components/source-picker/CubeTablePreview.js.map +1 -0
- package/lib/components/spec-transfer/CubeImportPureDialog.d.ts +27 -0
- package/lib/components/spec-transfer/CubeImportPureDialog.d.ts.map +1 -0
- package/lib/components/spec-transfer/CubeImportPureDialog.js +38 -0
- package/lib/components/spec-transfer/CubeImportPureDialog.js.map +1 -0
- package/lib/components/spec-transfer/CubeSpecTransferDialog.d.ts.map +1 -1
- package/lib/components/spec-transfer/CubeSpecTransferDialog.js +9 -3
- package/lib/components/spec-transfer/CubeSpecTransferDialog.js.map +1 -1
- package/lib/graph-manager/CubeDataProductCatalog.d.ts +10 -0
- package/lib/graph-manager/CubeDataProductCatalog.d.ts.map +1 -1
- package/lib/graph-manager/CubeDataProductCatalog.js.map +1 -1
- package/lib/graph-manager/CubeEngine.d.ts +46 -1
- package/lib/graph-manager/CubeEngine.d.ts.map +1 -1
- package/lib/graph-manager/CubeEngine.js.map +1 -1
- package/lib/graph-manager/CubeEngineClientSettings.d.ts +43 -0
- package/lib/graph-manager/CubeEngineClientSettings.d.ts.map +1 -0
- package/lib/graph-manager/CubeEngineClientSettings.js +51 -0
- package/lib/graph-manager/CubeEngineClientSettings.js.map +1 -0
- package/lib/graph-manager/CubeIngest.d.ts +5 -0
- package/lib/graph-manager/CubeIngest.d.ts.map +1 -1
- package/lib/graph-manager/CubeIngest.js +10 -0
- package/lib/graph-manager/CubeIngest.js.map +1 -1
- package/lib/graph-manager/CubeIngestCatalog.d.ts +26 -0
- package/lib/graph-manager/CubeIngestCatalog.d.ts.map +1 -1
- package/lib/graph-manager/CubeIngestCatalog.js +6 -0
- package/lib/graph-manager/CubeIngestCatalog.js.map +1 -1
- package/lib/graph-manager/CubeLakehouseRuntime.d.ts +29 -0
- package/lib/graph-manager/CubeLakehouseRuntime.d.ts.map +1 -0
- package/lib/graph-manager/CubeLakehouseRuntime.js +40 -0
- package/lib/graph-manager/CubeLakehouseRuntime.js.map +1 -0
- package/lib/graph-manager/CubeProjectCatalog.d.ts +3 -3
- package/lib/graph-manager/CubeService.d.ts +20 -0
- package/lib/graph-manager/CubeService.d.ts.map +1 -0
- package/lib/graph-manager/CubeService.js +22 -0
- package/lib/graph-manager/CubeService.js.map +1 -0
- package/lib/graph-manager/CubeServiceCatalog.d.ts +31 -0
- package/lib/graph-manager/CubeServiceCatalog.d.ts.map +1 -0
- package/lib/graph-manager/CubeServiceCatalog.js +17 -0
- package/lib/graph-manager/CubeServiceCatalog.js.map +1 -0
- package/lib/graph-manager/protocol/pure/CubeEngineBuilder.d.ts +52 -5
- package/lib/graph-manager/protocol/pure/CubeEngineBuilder.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/CubeEngineBuilder.js +63 -5
- package/lib/graph-manager/protocol/pure/CubeEngineBuilder.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeDataProductModel.d.ts +9 -6
- package/lib/graph-manager/protocol/pure/v1/V1_CubeDataProductModel.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeDataProductModel.js +12 -8
- package/lib/graph-manager/protocol/pure/v1/V1_CubeDataProductModel.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeFunctionOutlineBuilder.d.ts +30 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeFunctionOutlineBuilder.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeFunctionOutlineBuilder.js +229 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeFunctionOutlineBuilder.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeIngestDefinition.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeIngestDefinition.js +18 -9
- package/lib/graph-manager/protocol/pure/v1/V1_CubeIngestDefinition.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeIngestModel.d.ts +4 -9
- package/lib/graph-manager/protocol/pure/v1/V1_CubeIngestModel.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeIngestModel.js +2 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeIngestModel.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeLambdaReader.d.ts +34 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeLambdaReader.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeLambdaReader.js +332 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeLambdaReader.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeLambdaSerializer.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeLambdaSerializer.js +49 -10
- package/lib/graph-manager/protocol/pure/v1/V1_CubeLambdaSerializer.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.d.ts +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.js +3 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeConnectionExplorer.d.ts +2 -1
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeConnectionExplorer.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeConnectionExplorer.js +2 -1
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeConnectionExplorer.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.d.ts +18 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.js +74 -6
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeProjectCatalog.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeProjectCatalog.js +7 -4
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeProjectCatalog.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeServiceCatalog.d.ts +31 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeServiceCatalog.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeServiceCatalog.js +69 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeServiceCatalog.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.js +6 -2
- package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +12 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +10 -1
- package/lib/index.js.map +1 -1
- package/lib/stores/CubeAddPlacement.d.ts +10 -3
- package/lib/stores/CubeAddPlacement.d.ts.map +1 -1
- package/lib/stores/CubeAddPlacement.js +16 -5
- package/lib/stores/CubeAddPlacement.js.map +1 -1
- package/lib/stores/CubeDevSettingsState.d.ts +47 -0
- package/lib/stores/CubeDevSettingsState.d.ts.map +1 -0
- package/lib/stores/CubeDevSettingsState.js +99 -0
- package/lib/stores/CubeDevSettingsState.js.map +1 -0
- package/lib/stores/CubeEditorState.d.ts +173 -43
- package/lib/stores/CubeEditorState.d.ts.map +1 -1
- package/lib/stores/CubeEditorState.js +498 -113
- package/lib/stores/CubeEditorState.js.map +1 -1
- package/lib/stores/CubeEngineChecks.d.ts +59 -0
- package/lib/stores/CubeEngineChecks.d.ts.map +1 -0
- package/lib/stores/CubeEngineChecks.js +100 -0
- package/lib/stores/CubeEngineChecks.js.map +1 -0
- package/lib/stores/CubeExamples.d.ts.map +1 -1
- package/lib/stores/CubeExamples.js +39 -2
- package/lib/stores/CubeExamples.js.map +1 -1
- package/lib/stores/CubeExamplesState.d.ts +1 -1
- package/lib/stores/CubeExamplesState.d.ts.map +1 -1
- package/lib/stores/CubeExamplesState.js +2 -2
- package/lib/stores/CubeExamplesState.js.map +1 -1
- package/lib/stores/CubeExecutionState.d.ts.map +1 -1
- package/lib/stores/CubeExecutionState.js +24 -33
- package/lib/stores/CubeExecutionState.js.map +1 -1
- package/lib/stores/CubeExportState.d.ts +41 -0
- package/lib/stores/CubeExportState.d.ts.map +1 -0
- package/lib/stores/CubeExportState.js +134 -0
- package/lib/stores/CubeExportState.js.map +1 -0
- package/lib/stores/CubeExpressionFilterCheck.d.ts +51 -0
- package/lib/stores/CubeExpressionFilterCheck.d.ts.map +1 -0
- package/lib/stores/CubeExpressionFilterCheck.js +134 -0
- package/lib/stores/CubeExpressionFilterCheck.js.map +1 -0
- package/lib/stores/CubeExtendTyping.d.ts +6 -14
- package/lib/stores/CubeExtendTyping.d.ts.map +1 -1
- package/lib/stores/CubeExtendTyping.js +6 -33
- package/lib/stores/CubeExtendTyping.js.map +1 -1
- package/lib/stores/CubeFunctionRecheck.d.ts +30 -0
- package/lib/stores/CubeFunctionRecheck.d.ts.map +1 -0
- package/lib/stores/CubeFunctionRecheck.js +67 -0
- package/lib/stores/CubeFunctionRecheck.js.map +1 -0
- package/lib/stores/CubeGridFetcher.d.ts +75 -0
- package/lib/stores/CubeGridFetcher.d.ts.map +1 -0
- package/lib/stores/CubeGridFetcher.js +197 -0
- package/lib/stores/CubeGridFetcher.js.map +1 -0
- package/lib/stores/CubeGridQuickActions.d.ts +18 -6
- package/lib/stores/CubeGridQuickActions.d.ts.map +1 -1
- package/lib/stores/CubeGridQuickActions.js +32 -12
- package/lib/stores/CubeGridQuickActions.js.map +1 -1
- package/lib/stores/CubeGridState.d.ts +136 -0
- package/lib/stores/CubeGridState.d.ts.map +1 -0
- package/lib/stores/CubeGridState.js +317 -0
- package/lib/stores/CubeGridState.js.map +1 -0
- package/lib/stores/CubeHost.d.ts +42 -0
- package/lib/stores/CubeHost.d.ts.map +1 -1
- package/lib/stores/CubeHost.js +4 -0
- package/lib/stores/CubeHost.js.map +1 -1
- package/lib/stores/CubeLambdaImportState.d.ts +118 -0
- package/lib/stores/CubeLambdaImportState.d.ts.map +1 -0
- package/lib/stores/CubeLambdaImportState.js +302 -0
- package/lib/stores/CubeLambdaImportState.js.map +1 -0
- package/lib/stores/CubeLambdaSources.d.ts +45 -0
- package/lib/stores/CubeLambdaSources.d.ts.map +1 -0
- package/lib/stores/CubeLambdaSources.js +261 -0
- package/lib/stores/CubeLambdaSources.js.map +1 -0
- package/lib/stores/CubeQueryRun.d.ts +59 -0
- package/lib/stores/CubeQueryRun.d.ts.map +1 -0
- package/lib/stores/CubeQueryRun.js +101 -0
- package/lib/stores/CubeQueryRun.js.map +1 -0
- package/lib/stores/CubeRunStatsState.d.ts +61 -0
- package/lib/stores/CubeRunStatsState.d.ts.map +1 -0
- package/lib/stores/CubeRunStatsState.js +54 -0
- package/lib/stores/CubeRunStatsState.js.map +1 -0
- package/lib/stores/CubeRunningStepLambda.d.ts +25 -0
- package/lib/stores/CubeRunningStepLambda.d.ts.map +1 -0
- package/lib/stores/CubeRunningStepLambda.js +45 -0
- package/lib/stores/CubeRunningStepLambda.js.map +1 -0
- package/lib/stores/CubeServiceRecheck.d.ts +29 -0
- package/lib/stores/CubeServiceRecheck.d.ts.map +1 -0
- package/lib/stores/CubeServiceRecheck.js +33 -0
- package/lib/stores/CubeServiceRecheck.js.map +1 -0
- package/lib/stores/CubeShowPureState.d.ts +14 -1
- package/lib/stores/CubeShowPureState.d.ts.map +1 -1
- package/lib/stores/CubeShowPureState.js +41 -11
- package/lib/stores/CubeShowPureState.js.map +1 -1
- package/lib/stores/CubeSourcePickerState.d.ts +20 -4
- package/lib/stores/CubeSourcePickerState.d.ts.map +1 -1
- package/lib/stores/CubeSourcePickerState.js +75 -14
- package/lib/stores/CubeSourcePickerState.js.map +1 -1
- package/lib/stores/LocalModelCatalog.d.ts.map +1 -1
- package/lib/stores/LocalModelCatalog.js +3 -1
- package/lib/stores/LocalModelCatalog.js.map +1 -1
- package/lib/stores/editors/CubeExpressionFilterDraft.d.ts +91 -0
- package/lib/stores/editors/CubeExpressionFilterDraft.d.ts.map +1 -0
- package/lib/stores/editors/CubeExpressionFilterDraft.js +254 -0
- package/lib/stores/editors/CubeExpressionFilterDraft.js.map +1 -0
- package/lib/stores/editors/CubeFunctionDraft.d.ts +34 -0
- package/lib/stores/editors/CubeFunctionDraft.d.ts.map +1 -0
- package/lib/stores/editors/CubeFunctionDraft.js +69 -0
- package/lib/stores/editors/CubeFunctionDraft.js.map +1 -0
- package/lib/stores/editors/CubeNodeDraftRegistry.d.ts +4 -2
- package/lib/stores/editors/CubeNodeDraftRegistry.d.ts.map +1 -1
- package/lib/stores/editors/CubeNodeDraftRegistry.js +20 -3
- package/lib/stores/editors/CubeNodeDraftRegistry.js.map +1 -1
- package/lib/stores/editors/CubePivotDraft.d.ts +93 -0
- package/lib/stores/editors/CubePivotDraft.d.ts.map +1 -0
- package/lib/stores/editors/CubePivotDraft.js +267 -0
- package/lib/stores/editors/CubePivotDraft.js.map +1 -0
- package/lib/stores/fixtures/CubeSalesDuckDbModel.d.ts +26 -0
- package/lib/stores/fixtures/CubeSalesDuckDbModel.d.ts.map +1 -0
- package/lib/stores/fixtures/CubeSalesDuckDbModel.js +46 -0
- package/lib/stores/fixtures/CubeSalesDuckDbModel.js.map +1 -0
- package/lib/stores/fixtures/CubeTradesModel.d.ts +4 -0
- package/lib/stores/fixtures/CubeTradesModel.d.ts.map +1 -1
- package/lib/stores/fixtures/CubeTradesModel.js +31 -1
- package/lib/stores/fixtures/CubeTradesModel.js.map +1 -1
- package/lib/stores/source-picker/CubeDataProductTabState.d.ts +34 -5
- package/lib/stores/source-picker/CubeDataProductTabState.d.ts.map +1 -1
- package/lib/stores/source-picker/CubeDataProductTabState.js +111 -26
- package/lib/stores/source-picker/CubeDataProductTabState.js.map +1 -1
- package/lib/stores/source-picker/CubeDirectConnectionTabState.d.ts +25 -2
- package/lib/stores/source-picker/CubeDirectConnectionTabState.d.ts.map +1 -1
- package/lib/stores/source-picker/CubeDirectConnectionTabState.js +183 -31
- package/lib/stores/source-picker/CubeDirectConnectionTabState.js.map +1 -1
- package/lib/stores/source-picker/CubeIngestTabState.d.ts +22 -9
- package/lib/stores/source-picker/CubeIngestTabState.d.ts.map +1 -1
- package/lib/stores/source-picker/CubeIngestTabState.js +84 -29
- package/lib/stores/source-picker/CubeIngestTabState.js.map +1 -1
- package/lib/stores/source-picker/CubeInlineModelTabState.d.ts +100 -4
- package/lib/stores/source-picker/CubeInlineModelTabState.d.ts.map +1 -1
- package/lib/stores/source-picker/CubeInlineModelTabState.js +415 -28
- package/lib/stores/source-picker/CubeInlineModelTabState.js.map +1 -1
- package/lib/stores/source-picker/CubeProjectTabState.d.ts +18 -3
- package/lib/stores/source-picker/CubeProjectTabState.d.ts.map +1 -1
- package/lib/stores/source-picker/CubeProjectTabState.js +26 -1
- package/lib/stores/source-picker/CubeProjectTabState.js.map +1 -1
- package/lib/stores/source-picker/CubeServiceTabState.d.ts +74 -0
- package/lib/stores/source-picker/CubeServiceTabState.d.ts.map +1 -0
- package/lib/stores/source-picker/CubeServiceTabState.js +216 -0
- package/lib/stores/source-picker/CubeServiceTabState.js.map +1 -0
- package/lib/stores/source-picker/CubeSourcePickerTab.d.ts +15 -3
- package/lib/stores/source-picker/CubeSourcePickerTab.d.ts.map +1 -1
- package/lib/stores/source-picker/CubeSourcePickerTab.js +21 -0
- package/lib/stores/source-picker/CubeSourcePickerTab.js.map +1 -1
- package/package.json +10 -9
- package/src/__lib__/LegendCubeCommand.ts +7 -0
- package/src/__lib__/LegendCubeFunctionLabels.ts +41 -0
- package/src/__lib__/LegendCubeHelpText.ts +23 -1
- package/src/__lib__/LegendCubeLabels.ts +170 -13
- package/src/__lib__/LegendCubeProjectSourceLabels.ts +26 -0
- package/src/__lib__/LegendCubeServiceLabels.ts +41 -0
- package/src/__lib__/LegendCubeTesting.ts +7 -0
- package/src/__test-utils__/CubeEngineTestSupport.ts +2 -1
- package/src/__test-utils__/CubeExpressionTestUtils.ts +29 -2
- package/src/__test-utils__/CubeFunctionTestOutline.ts +78 -0
- package/src/__test-utils__/CubeLambdaCorpus.ts +137 -0
- package/src/__test-utils__/CubePageTestUtils.tsx +34 -0
- package/src/__test-utils__/CubeTestApplication.ts +25 -0
- package/src/__test-utils__/FakeCubeEngine.ts +27 -0
- package/src/__test-utils__/FakeCubeIngestCatalog.ts +18 -0
- package/src/__test-utils__/FakeCubeServiceCatalog.ts +57 -0
- package/src/components/CubeAddItems.tsx +13 -6
- package/src/components/CubeDialogTheme.ts +25 -0
- package/src/components/CubeEditor.tsx +155 -129
- package/src/components/CubeFileMenu.tsx +127 -0
- package/src/components/CubeLambdaImportBanner.tsx +97 -0
- package/src/components/CubeNodeIcon.tsx +7 -0
- package/src/components/CubeSchemaColumnsTable.tsx +7 -2
- package/src/components/canvas/CubeCanvas.tsx +52 -13
- package/src/components/canvas/CubeCanvasContextMenu.tsx +33 -2
- package/src/components/canvas/CubeCanvasElements.ts +76 -3
- package/src/components/canvas/CubeCanvasLayout.ts +1 -1
- package/src/components/canvas/CubeCanvasNode.tsx +30 -3
- package/src/components/dev-settings/CubeDevSettings.tsx +154 -0
- package/src/components/editors/CubeColumnChecklist.tsx +8 -2
- package/src/components/editors/CubeColumnPicker.tsx +6 -3
- package/src/components/editors/CubeConcatEditor.tsx +2 -2
- package/src/components/editors/CubeExpressionFilterEditor.tsx +193 -0
- package/src/components/editors/CubeExtendEditor.tsx +3 -3
- package/src/components/editors/CubeFilterEditor.tsx +13 -1
- package/src/components/editors/CubeFunctionSourceEditor.tsx +140 -0
- package/src/components/editors/CubeJoinEditor.tsx +23 -4
- package/src/components/editors/CubeNodeEditorPanel.tsx +22 -10
- package/src/components/editors/CubeNodeEditorPopper.tsx +9 -1
- package/src/components/editors/CubeNodeEditorRegistry.ts +12 -0
- package/src/components/editors/CubePivotEditor.tsx +277 -0
- package/src/components/editors/CubeRestrictEditor.tsx +8 -2
- package/src/components/editors/CubeServiceSourceEditor.tsx +77 -0
- package/src/components/grid/CubeColumnFormatDialog.tsx +289 -0
- package/src/components/grid/CubeDrilldownBar.tsx +219 -0
- package/src/components/grid/CubeGridRegion.tsx +170 -54
- package/src/components/grid/CubeGridValues.ts +146 -1
- package/src/components/grid/CubeResultGrid.tsx +443 -41
- package/src/components/grid/CubeRunStatsPanel.tsx +156 -0
- package/src/components/grid/CubeServerSideGrid.tsx +200 -0
- package/src/components/grid/CubeSqlDialog.tsx +90 -0
- package/src/components/grid/CubeSqlFormat.ts +37 -0
- package/src/components/palette/CubePalette.tsx +45 -12
- package/src/components/show-pure/CubeShowPureDialog.tsx +19 -5
- package/src/components/source-picker/CubeDataProductTab.tsx +169 -75
- package/src/components/source-picker/CubeDirectConnectionTab.tsx +42 -30
- package/src/components/source-picker/CubeFunctionSteps.tsx +244 -0
- package/src/components/source-picker/CubeIngestTab.tsx +159 -79
- package/src/components/source-picker/CubeInlineModelTab.tsx +110 -81
- package/src/components/source-picker/CubePickerListItem.tsx +118 -0
- package/src/components/source-picker/CubeProjectTab.tsx +6 -3
- package/src/components/source-picker/CubeServiceTab.tsx +151 -0
- package/src/components/source-picker/CubeSourcePicker.tsx +54 -18
- package/src/components/source-picker/CubeTablePreview.tsx +49 -0
- package/src/components/spec-transfer/CubeImportPureDialog.tsx +122 -0
- package/src/components/spec-transfer/CubeSpecTransferDialog.tsx +21 -8
- package/src/graph-manager/CubeDataProductCatalog.ts +11 -0
- package/src/graph-manager/CubeEngine.ts +51 -1
- package/src/graph-manager/CubeEngineClientSettings.ts +64 -0
- package/src/graph-manager/CubeIngest.ts +15 -0
- package/src/graph-manager/CubeIngestCatalog.ts +33 -0
- package/src/graph-manager/CubeLakehouseRuntime.ts +43 -0
- package/src/graph-manager/CubeProjectCatalog.ts +3 -3
- package/src/graph-manager/CubeService.ts +29 -0
- package/src/graph-manager/CubeServiceCatalog.ts +35 -0
- package/src/graph-manager/protocol/pure/CubeEngineBuilder.ts +115 -5
- package/src/graph-manager/protocol/pure/v1/V1_CubeDataProductModel.ts +13 -7
- package/src/graph-manager/protocol/pure/v1/V1_CubeFunctionOutlineBuilder.ts +312 -0
- package/src/graph-manager/protocol/pure/v1/V1_CubeIngestDefinition.ts +35 -9
- package/src/graph-manager/protocol/pure/v1/V1_CubeIngestModel.ts +6 -15
- package/src/graph-manager/protocol/pure/v1/V1_CubeLambdaReader.ts +471 -0
- package/src/graph-manager/protocol/pure/v1/V1_CubeLambdaSerializer.ts +70 -15
- package/src/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.ts +3 -1
- package/src/graph-manager/protocol/pure/v1/V1_LegendCubeConnectionExplorer.ts +7 -1
- package/src/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.ts +122 -7
- package/src/graph-manager/protocol/pure/v1/V1_LegendCubeProjectCatalog.ts +9 -4
- package/src/graph-manager/protocol/pure/v1/V1_LegendCubeServiceCatalog.ts +92 -0
- package/src/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.ts +6 -1
- package/src/index.ts +32 -2
- package/src/stores/CubeAddPlacement.ts +25 -5
- package/src/stores/CubeDevSettingsState.ts +117 -0
- package/src/stores/CubeEditorState.ts +687 -197
- package/src/stores/CubeEngineChecks.ts +240 -0
- package/src/stores/CubeExamples.ts +70 -1
- package/src/stores/CubeExamplesState.ts +4 -2
- package/src/stores/CubeExecutionState.ts +26 -57
- package/src/stores/CubeExportState.ts +196 -0
- package/src/stores/CubeExpressionFilterCheck.ts +218 -0
- package/src/stores/CubeExtendTyping.ts +6 -46
- package/src/stores/CubeFunctionRecheck.ts +97 -0
- package/src/stores/CubeGridFetcher.ts +302 -0
- package/src/stores/CubeGridQuickActions.ts +33 -11
- package/src/stores/CubeGridState.ts +450 -0
- package/src/stores/CubeHost.ts +48 -0
- package/src/stores/CubeLambdaImportState.ts +434 -0
- package/src/stores/CubeLambdaSources.ts +390 -0
- package/src/stores/CubeQueryRun.ts +169 -0
- package/src/stores/CubeRunStatsState.ts +91 -0
- package/src/stores/CubeRunningStepLambda.ts +62 -0
- package/src/stores/CubeServiceRecheck.ts +53 -0
- package/src/stores/CubeShowPureState.ts +51 -12
- package/src/stores/CubeSourcePickerState.ts +89 -13
- package/src/stores/LocalModelCatalog.ts +6 -1
- package/src/stores/editors/CubeExpressionFilterDraft.ts +385 -0
- package/src/stores/editors/CubeFunctionDraft.ts +92 -0
- package/src/stores/editors/CubeNodeDraftRegistry.ts +27 -2
- package/src/stores/editors/CubePivotDraft.ts +355 -0
- package/src/stores/fixtures/CubeSalesDuckDbModel.ts +54 -0
- package/src/stores/fixtures/CubeTradesModel.ts +36 -1
- package/src/stores/source-picker/CubeDataProductTabState.ts +162 -35
- package/src/stores/source-picker/CubeDirectConnectionTabState.ts +246 -47
- package/src/stores/source-picker/CubeIngestTabState.ts +112 -38
- package/src/stores/source-picker/CubeInlineModelTabState.ts +514 -34
- package/src/stores/source-picker/CubeProjectTabState.ts +35 -3
- package/src/stores/source-picker/CubeServiceTabState.ts +288 -0
- package/src/stores/source-picker/CubeSourcePickerTab.ts +31 -2
- package/tsconfig.json +50 -0
|
@@ -16,8 +16,10 @@
|
|
|
16
16
|
import { parseLosslessJSON } from '@finos/legend-shared';
|
|
17
17
|
// Cube IR → V1 protocol lambda JSON (PLAN §8.3, §8.5), built as plain JSON,
|
|
18
18
|
// never through legend-graph's value-specification classes, whose serializer
|
|
19
|
-
// drops `sourceInformation`.
|
|
20
|
-
// request body must be written with `stringifyLosslessJSON
|
|
19
|
+
// drops `sourceInformation`. Integers and floats are lossless number values,
|
|
20
|
+
// so the request body must be written with `stringifyLosslessJSON`; decimals
|
|
21
|
+
// are strings, which the engine reads as `BigDecimal` with every digit, where
|
|
22
|
+
// a JSON number goes through a double (PLAN §11.10, ISSUES.md).
|
|
21
23
|
/** The prefix of the source ids Cube stamps, `cube:<nodeId>:<role>` */
|
|
22
24
|
export const V1_CUBE_SOURCE_ID_PREFIX = 'cube:';
|
|
23
25
|
/** A JSON number token: what an integer, float or decimal literal must be */
|
|
@@ -45,13 +47,21 @@ const stamped = (json, origin) => origin
|
|
|
45
47
|
sourceInformation: { sourceId: V1_buildCubeSourceId(origin) },
|
|
46
48
|
}
|
|
47
49
|
: json;
|
|
48
|
-
/** A
|
|
49
|
-
const
|
|
50
|
+
/** A numeric literal's text, checked to be a JSON number */
|
|
51
|
+
const checkNumberText = (text) => {
|
|
50
52
|
if (!NUMBER_TOKEN.test(text)) {
|
|
51
53
|
throw new Error(`"${text}" is not a number Cube can send`);
|
|
52
54
|
}
|
|
53
|
-
return
|
|
55
|
+
return text;
|
|
54
56
|
};
|
|
57
|
+
/** A lossless JSON number for a numeric literal's text, written digit for digit */
|
|
58
|
+
const numberToken = (text) => parseLosslessJSON(checkNumberText(text));
|
|
59
|
+
/**
|
|
60
|
+
* A numeric literal's value as the engine reads it without loss: a decimal's
|
|
61
|
+
* as its text, which the engine reads as a `BigDecimal` (a JSON number loses
|
|
62
|
+
* the digits past a double's), an integer's or a float's as a JSON number
|
|
63
|
+
*/
|
|
64
|
+
const numberValue = (type, text) => type === 'decimal' ? checkNumberText(text) : numberToken(text);
|
|
55
65
|
/** The literal types whose value is a number, which Cube keeps as its digit string in an expression's JSON */
|
|
56
66
|
const NUMBER_LITERAL_TYPES = [
|
|
57
67
|
'integer',
|
|
@@ -77,10 +87,17 @@ const serializeLambdaJson = (json, origin) => {
|
|
|
77
87
|
.map(([key, value]) => [key, serializeLambdaJson(value, origin)]));
|
|
78
88
|
if (NUMBER_LITERAL_TYPES.includes(object._type) &&
|
|
79
89
|
typeof object.value === 'string') {
|
|
80
|
-
object.value =
|
|
90
|
+
object.value = numberValue(object._type, object.value);
|
|
81
91
|
}
|
|
82
92
|
return typeof object._type === 'string' ? stamped(object, origin) : object;
|
|
83
93
|
};
|
|
94
|
+
/** A type's JSON: its path, and its parameters as integers, e.g. `Varchar(15)` */
|
|
95
|
+
const genericTypeJson = (path, params, origin) => ({
|
|
96
|
+
rawType: { _type: 'packageableType', fullPath: path },
|
|
97
|
+
typeArguments: [],
|
|
98
|
+
multiplicityArguments: [],
|
|
99
|
+
typeVariableValues: (params ?? []).map((param) => stamped({ _type: 'integer', value: numberToken(String(param)) }, origin)),
|
|
100
|
+
});
|
|
84
101
|
const serializeLiteral = (value) => {
|
|
85
102
|
switch (value.kind) {
|
|
86
103
|
case 'string':
|
|
@@ -91,7 +108,7 @@ const serializeLiteral = (value) => {
|
|
|
91
108
|
case 'integer':
|
|
92
109
|
case 'float':
|
|
93
110
|
case 'decimal':
|
|
94
|
-
return { _type: value.kind, value:
|
|
111
|
+
return { _type: value.kind, value: numberValue(value.kind, value.value) };
|
|
95
112
|
case 'enum':
|
|
96
113
|
// enumeration values are emitted as `enumValue`, with their enumeration
|
|
97
114
|
throw new Error(`Can't send the enumeration value "${value.value}" as a literal`);
|
|
@@ -198,13 +215,35 @@ const serialize = (ir, inherited) => {
|
|
|
198
215
|
case 'elementPtr':
|
|
199
216
|
return stamped({ _type: 'packageableElementPtr', fullPath: ir.path }, inherited);
|
|
200
217
|
case 'genericType':
|
|
218
|
+
return stamped({
|
|
219
|
+
_type: 'genericTypeInstance',
|
|
220
|
+
genericType: genericTypeJson(ir.path, ir.params, inherited),
|
|
221
|
+
}, inherited);
|
|
222
|
+
case 'relationType':
|
|
201
223
|
return stamped({
|
|
202
224
|
_type: 'genericTypeInstance',
|
|
203
225
|
genericType: {
|
|
204
|
-
rawType: { _type: 'packageableType', fullPath:
|
|
205
|
-
typeArguments: [
|
|
226
|
+
rawType: { _type: 'packageableType', fullPath: 'Relation' },
|
|
227
|
+
typeArguments: [
|
|
228
|
+
{
|
|
229
|
+
rawType: {
|
|
230
|
+
_type: 'relationType',
|
|
231
|
+
columns: ir.columns.map(({ name, type, nullable }) => ({
|
|
232
|
+
name,
|
|
233
|
+
genericType: genericTypeJson(type.path, type.params, inherited),
|
|
234
|
+
multiplicity: {
|
|
235
|
+
lowerBound: nullable ? 0 : 1,
|
|
236
|
+
upperBound: 1,
|
|
237
|
+
},
|
|
238
|
+
})),
|
|
239
|
+
},
|
|
240
|
+
typeArguments: [],
|
|
241
|
+
multiplicityArguments: [],
|
|
242
|
+
typeVariableValues: [],
|
|
243
|
+
},
|
|
244
|
+
],
|
|
206
245
|
multiplicityArguments: [],
|
|
207
|
-
typeVariableValues:
|
|
246
|
+
typeVariableValues: [],
|
|
208
247
|
},
|
|
209
248
|
}, inherited);
|
|
210
249
|
case 'enumValue': {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"V1_CubeLambdaSerializer.js","sourceRoot":"","sources":["../../../../../src/graph-manager/protocol/pure/v1/V1_CubeLambdaSerializer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;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AC;YACX,iEAAiE;YACjE,sEAAsE;YACtE,4BAA4B;YAC5B,MAAM,MAAM,GAAG,EAAE,CAAC,MAAM,IAAI,SAAS,CAAC;YACtC,OAAO,OAAO,CACZ;gBACE,KAAK,EAAE,MAAM;gBACb,QAAQ,EAAE,aAAa;gBACvB,UAAU,EAAE;oBACV,OAAO,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE,MAAM,CAAC;oBACpD,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;iBAC5B;aACF,EACD,MAAM,CACP,CAAC;QACJ,CAAC;QACD,KAAK,KAAK;YACR,OAAO,EAAE,CAAC,IAAmB,CAAC;QAChC,KAAK,YAAY;YACf,OAAO,mBAAmB,CACxB,EAAE,CAAC,IAAI,EACP,EAAE,CAAC,MAAM,IAAI,SAAS,CACR,CAAC;QACnB,OAAO,CAAC,CAAC,CAAC;YACR,MAAM,OAAO,GAAU,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CAAC,cAAc,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC3D,CAAC;IACH,CAAC;AACH,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EAAM,EAAe,EAAE;IAC5D,IAAI,EAAE,CAAC,CAAC,KAAK,QAAQ,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,mCAAmC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;IAC9D,CAAC;IACD,OAAO,SAAS,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;AAClC,CAAC,CAAC"}
|
|
@@ -15,6 +15,6 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type { PlainObject } from '@finos/legend-shared';
|
|
17
17
|
import { type CubeModelOutline } from '../../../CubeEngine.js';
|
|
18
|
-
/** The outline of a parsed model: its Database elements and its
|
|
18
|
+
/** The outline of a parsed model: its Database elements, its readable runtimes and its functions that return a relation, in model order */
|
|
19
19
|
export declare const V1_buildCubeModelOutline: (modelData: PlainObject) => CubeModelOutline;
|
|
20
20
|
//# sourceMappingURL=V1_CubeModelOutlineBuilder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"V1_CubeModelOutlineBuilder.d.ts","sourceRoot":"","sources":["../../../../../src/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAEL,KAAK,gBAAgB,EAMtB,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"V1_CubeModelOutlineBuilder.d.ts","sourceRoot":"","sources":["../../../../../src/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAEL,KAAK,gBAAgB,EAMtB,MAAM,wBAAwB,CAAC;AA6LhC,2IAA2I;AAC3I,eAAO,MAAM,wBAAwB,GACnC,WAAW,WAAW,KACrB,gBA0BF,CAAC"}
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { getRelationalDisplayName } from '@finos/legend-cube';
|
|
17
17
|
import { CubeTableFlag, } from '../../../CubeEngine.js';
|
|
18
|
+
import { V1_buildCubeFunctionOutlines } from './V1_CubeFunctionOutlineBuilder.js';
|
|
18
19
|
// The databases and runtimes of a parsed model (`{_type: 'data', elements}`),
|
|
19
20
|
// for the source picker (PLAN §6.2.3-§6.2.6). Read as plain JSON: only names,
|
|
20
21
|
// column types and store paths are needed, and an element's full protocol
|
|
@@ -148,7 +149,7 @@ const buildRuntime = (element, connectionTypes) => {
|
|
|
148
149
|
connections,
|
|
149
150
|
};
|
|
150
151
|
};
|
|
151
|
-
/** The outline of a parsed model: its Database elements and its
|
|
152
|
+
/** The outline of a parsed model: its Database elements, its readable runtimes and its functions that return a relation, in model order */
|
|
152
153
|
export const V1_buildCubeModelOutline = (modelData) => {
|
|
153
154
|
const elements = asList(modelData.elements).map(asObject);
|
|
154
155
|
// the database type of each relational connection element, by path
|
|
@@ -169,6 +170,7 @@ export const V1_buildCubeModelOutline = (modelData) => {
|
|
|
169
170
|
.filter((element) => element._type === RUNTIME_TYPE)
|
|
170
171
|
.map((element) => buildRuntime(element, connectionTypes))
|
|
171
172
|
.filter((runtime) => runtime !== undefined),
|
|
173
|
+
functions: V1_buildCubeFunctionOutlines(elements),
|
|
172
174
|
};
|
|
173
175
|
};
|
|
174
176
|
//# sourceMappingURL=V1_CubeModelOutlineBuilder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"V1_CubeModelOutlineBuilder.js","sourceRoot":"","sources":["../../../../../src/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,EACL,aAAa,GAOd,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"V1_CubeModelOutlineBuilder.js","sourceRoot":"","sources":["../../../../../src/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,EACL,aAAa,GAOd,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAElF,8EAA8E;AAC9E,8EAA8E;AAC9E,0EAA0E;AAC1E,kDAAkD;AAElD,MAAM,aAAa,GAAG,YAAY,CAAC;AACnC,MAAM,YAAY,G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CAAC;KAClD,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import { V1_EngineServerClient } from '@finos/legend-graph';
|
|
17
17
|
import type { TracerService } from '@finos/legend-shared';
|
|
18
18
|
import type { CubeConnectionDescription, CubeConnectionDraft, CubeConnectionExplorer, CubeDirectConnection, CubeExploredTable } from '../../../CubeConnectionExplorer.js';
|
|
19
|
+
import type { CubeEngineClientSettings } from '../../../CubeEngineClientSettings.js';
|
|
19
20
|
import type { V1_CubeEngineConfig } from './V1_LegendCubeEngine.js';
|
|
20
21
|
/**
|
|
21
22
|
* The Legend implementation of the connection explorer (PLAN §6.8): the
|
|
@@ -24,7 +25,7 @@ import type { V1_CubeEngineConfig } from './V1_LegendCubeEngine.js';
|
|
|
24
25
|
*/
|
|
25
26
|
export declare class V1_LegendCubeConnectionExplorer implements CubeConnectionExplorer {
|
|
26
27
|
readonly client: V1_EngineServerClient;
|
|
27
|
-
constructor(config: V1_CubeEngineConfig, tracerService: TracerService);
|
|
28
|
+
constructor(config: V1_CubeEngineConfig, tracerService: TracerService, clientSettings?: CubeEngineClientSettings);
|
|
28
29
|
buildConnection(draft: CubeConnectionDraft): CubeDirectConnection;
|
|
29
30
|
describeConnection(connection: CubeDirectConnection): CubeConnectionDescription;
|
|
30
31
|
listSchemas(connection: CubeDirectConnection): Promise<readonly string[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"V1_LegendCubeConnectionExplorer.d.ts","sourceRoot":"","sources":["../../../../../src/graph-manager/protocol/pure/v1/V1_LegendCubeConnectionExplorer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAe,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,KAAK,EACV,yBAAyB,EACzB,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EAEpB,iBAAiB,EAClB,MAAM,oCAAoC,CAAC;AAc5C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAKpE;;;;GAIG;AACH,qBAAa,+BAAgC,YAAW,sBAAsB;IAC5E,QAAQ,CAAC,MAAM,EAAE,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"V1_LegendCubeConnectionExplorer.d.ts","sourceRoot":"","sources":["../../../../../src/graph-manager/protocol/pure/v1/V1_LegendCubeConnectionExplorer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAe,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,KAAK,EACV,yBAAyB,EACzB,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EAEpB,iBAAiB,EAClB,MAAM,oCAAoC,CAAC;AAc5C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AACrF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAKpE;;;;GAIG;AACH,qBAAa,+BAAgC,YAAW,sBAAsB;IAC5E,QAAQ,CAAC,MAAM,EAAE,qBAAqB,CAAC;gBAGrC,MAAM,EAAE,mBAAmB,EAC3B,aAAa,EAAE,aAAa,EAC5B,cAAc,CAAC,EAAE,wBAAwB;IAO3C,eAAe,CAAC,KAAK,EAAE,mBAAmB,GAAG,oBAAoB;IAIjE,kBAAkB,CAChB,UAAU,EAAE,oBAAoB,GAC/B,yBAAyB;IAUtB,WAAW,CACf,UAAU,EAAE,oBAAoB,GAC/B,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC;IAMvB,UAAU,CACd,UAAU,EAAE,oBAAoB,EAChC,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,SAAS,iBAAiB,EAAE,CAAC;YAO1B,OAAO;CAwBtB"}
|
|
@@ -26,9 +26,10 @@ const EXPLORED_DATABASE = { package: 'cube::explored', name: 'Database' };
|
|
|
26
26
|
*/
|
|
27
27
|
export class V1_LegendCubeConnectionExplorer {
|
|
28
28
|
client;
|
|
29
|
-
constructor(config, tracerService) {
|
|
29
|
+
constructor(config, tracerService, clientSettings) {
|
|
30
30
|
this.client = new V1_EngineServerClient(config);
|
|
31
31
|
this.client.setTracerService(tracerService);
|
|
32
|
+
clientSettings?.register(this.client);
|
|
32
33
|
}
|
|
33
34
|
buildConnection(draft) {
|
|
34
35
|
return V1_buildCubeDirectConnection(draft);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"V1_LegendCubeConnectionExplorer.js","sourceRoot":"","sources":["../../../../../src/graph-manager/protocol/pure/v1/V1_LegendCubeConnectionExplorer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAU5D,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAC5B,gCAAgC,GACjC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,kCAAkC,EAClC,0BAA0B,EAC1B,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"V1_LegendCubeConnectionExplorer.js","sourceRoot":"","sources":["../../../../../src/graph-manager/protocol/pure/v1/V1_LegendCubeConnectionExplorer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAU5D,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAC5B,gCAAgC,GACjC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,kCAAkC,EAClC,0B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AAK,CAAC,OAAO,CACnB,UAAgC,EAChC,KAA8B;QAE9B,MAAM,QAAQ,GAAG,4BAA4B,CAAC,UAAU,CAAC,CAAC;QAC1D,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;YACpB,MAAM,IAAI,eAAe,CACvB,mBAAmB,CAAC,OAAO,EAC3B,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CACpB,CAAC;QACJ,CAAC;QACD,IAAI,CAAC;YACH,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,aAAa,CACpC,kCAAkC,CAChC,UAAU,EACV,UAAU,CAAC,YAAsC,EACjD,iBAAiB,EACjB,KAAK,CACN,CACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,yBAAyB,CAAC,KAAK,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;QACtE,CAAC;IACH,CAAC;CACF"}
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
import { type IR, type ModelContext, type Schema } from '@finos/legend-cube';
|
|
17
17
|
import { V1_EngineServerClient } from '@finos/legend-graph';
|
|
18
18
|
import { type TracerService } from '@finos/legend-shared';
|
|
19
|
+
import type { CubeEngineClientSettings } from '../../../CubeEngineClientSettings.js';
|
|
20
|
+
import type { CubeDataProductModelSource } from '../../../CubeDataProductCatalog.js';
|
|
19
21
|
import type { CubeLakehouseEnvironment } from '../../../CubeLakehouseEnvironment.js';
|
|
20
22
|
import { type AccessorPath, type CubeEngine, CubeEngineError, type CubeModelOutline, type CubeParsedExpression, type CubeResult, type NodeId } from '../../../CubeEngine.js';
|
|
21
23
|
import { type V1_CubeIngestDefinitionSource } from './V1_CubeIngestModel.js';
|
|
@@ -43,11 +45,23 @@ export declare class V1_LegendCubeEngine implements CubeEngine {
|
|
|
43
45
|
private readonly getRememberedWarehouse;
|
|
44
46
|
/** The deployed ingest definitions, which ingest cubes read */
|
|
45
47
|
private readonly ingestDefinitions;
|
|
48
|
+
/** The model data product cubes read their project from, when not its deployed version */
|
|
49
|
+
private readonly dataProductModels;
|
|
46
50
|
constructor(config: V1_CubeEngineConfig, tracerService: TracerService, options?: {
|
|
47
51
|
lakehouseEnvironment?: CubeLakehouseEnvironment | undefined;
|
|
48
52
|
getRememberedWarehouse?: (() => string | undefined) | undefined;
|
|
49
53
|
ingestDefinitions?: V1_CubeIngestDefinitionSource | undefined;
|
|
54
|
+
/** Dev Settings' engine URL and compression (PLAN §11.16) */
|
|
55
|
+
clientSettings?: CubeEngineClientSettings | undefined;
|
|
56
|
+
dataProductModels?: CubeDataProductModelSource | undefined;
|
|
50
57
|
});
|
|
58
|
+
/**
|
|
59
|
+
* The elements an ingest cube's model holds: the host's, when it has more
|
|
60
|
+
* than the definitions (Studio's workspace), else the definitions read
|
|
61
|
+
*/
|
|
62
|
+
private ingestModelElementsOf;
|
|
63
|
+
/** The model a data product cube's project is read from: the host's, else its deployed version's pointer */
|
|
64
|
+
private dataProductProjectModelOf;
|
|
51
65
|
/** An ingest model's settings, or an unsupported-model error naming its problems */
|
|
52
66
|
private ingestSettingsOf;
|
|
53
67
|
/**
|
|
@@ -105,6 +119,9 @@ export declare class V1_LegendCubeEngine implements CubeEngine {
|
|
|
105
119
|
execute(model: ModelContext, executionLambda: IR, options?: {
|
|
106
120
|
abortController?: AbortController | undefined;
|
|
107
121
|
}): Promise<CubeResult>;
|
|
122
|
+
exportCsv(model: ModelContext, executionLambda: IR, options?: {
|
|
123
|
+
abortController?: AbortController | undefined;
|
|
124
|
+
}): Promise<string>;
|
|
108
125
|
/**
|
|
109
126
|
* The model a run on a data product cube runs on (PLAN §6.8): its project at
|
|
110
127
|
* the saved version, and a lakehouse runtime at Cube's fixed path, in the
|
|
@@ -134,6 +151,7 @@ export declare class V1_LegendCubeEngine implements CubeEngine {
|
|
|
134
151
|
private executionBodyOf;
|
|
135
152
|
planLambda(model: ModelContext, executionLambda: IR): Promise<void>;
|
|
136
153
|
parseExpression(code: string, sourceId: string): Promise<CubeParsedExpression>;
|
|
154
|
+
serializeLambda(lambdaIR: IR): string;
|
|
137
155
|
renderPure(lambdaIR: IR): Promise<string>;
|
|
138
156
|
}
|
|
139
157
|
//# sourceMappingURL=V1_LegendCubeEngine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"V1_LegendCubeEngine.d.ts","sourceRoot":"","sources":["../../../../../src/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,KAAK,EAAE,EAEP,KAAK,YAAY,EACjB,KAAK,MAAM,EAEZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,
|
|
1
|
+
{"version":3,"file":"V1_LegendCubeEngine.d.ts","sourceRoot":"","sources":["../../../../../src/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,KAAK,EAAE,EAEP,KAAK,YAAY,EACjB,KAAK,MAAM,EAEZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEL,qBAAqB,EAEtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAML,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAoB9B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AACrF,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AACrF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAWrF,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,eAAe,EAEf,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,UAAU,EACf,KAAK,MAAM,EACZ,MAAM,wBAAwB,CAAC;AAUhC,OAAO,EAKL,KAAK,6BAA6B,EAGnC,MAAM,yBAAyB,CAAC;AA2BjC,qGAAqG;AACrG,MAAM,MAAM,mBAAmB,GAAG,qBAAq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MAAM,GACf,OAAO,CAAC,oBAAoB,CAAC;IA4BhC,eAAe,CAAC,QAAQ,EAAE,EAAE,GAAG,MAAM;IAQ/B,UAAU,CAAC,QAAQ,EAAE,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;CAchD"}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { EmitRole, lambda, storeAccessor, } from '@finos/legend-cube';
|
|
17
|
-
import { V1_EngineServerClient, V1_RenderStyle } from '@finos/legend-graph';
|
|
17
|
+
import { EXECUTION_SERIALIZATION_FORMAT, V1_EngineServerClient, V1_RenderStyle, } from '@finos/legend-graph';
|
|
18
18
|
import { ContentType, HttpHeader, parseLosslessJSON, stringifyLosslessJSON, } from '@finos/legend-shared';
|
|
19
19
|
import { checkCubeDataProductModel, CUBE_DATA_PRODUCT_RUNTIME_PATH, getCubeDataProductProject, getEffectiveCubeWarehouse, isCubeDataProductModel, } from '../../../CubeDataProduct.js';
|
|
20
20
|
import { checkCubeIngestModel, CUBE_INGEST_RUNTIME_PATH, getCubeIngestSettings, isCubeIngestModel, } from '../../../CubeIngest.js';
|
|
@@ -139,14 +139,32 @@ export class V1_LegendCubeEngine {
|
|
|
139
139
|
getRememberedWarehouse;
|
|
140
140
|
/** The deployed ingest definitions, which ingest cubes read */
|
|
141
141
|
ingestDefinitions;
|
|
142
|
+
/** The model data product cubes read their project from, when not its deployed version */
|
|
143
|
+
dataProductModels;
|
|
142
144
|
constructor(config, tracerService, options) {
|
|
143
145
|
this.client = new V1_EngineServerClient(config);
|
|
144
146
|
// every call throws without one
|
|
145
147
|
this.client.setTracerService(tracerService);
|
|
148
|
+
options?.clientSettings?.register(this.client);
|
|
146
149
|
this.lakehouseEnvironment = options?.lakehouseEnvironment;
|
|
147
150
|
this.getRememberedWarehouse =
|
|
148
151
|
options?.getRememberedWarehouse ?? (() => undefined);
|
|
149
152
|
this.ingestDefinitions = options?.ingestDefinitions;
|
|
153
|
+
this.dataProductModels = options?.dataProductModels;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* The elements an ingest cube's model holds: the host's, when it has more
|
|
157
|
+
* than the definitions (Studio's workspace), else the definitions read
|
|
158
|
+
*/
|
|
159
|
+
async ingestModelElementsOf(definitions) {
|
|
160
|
+
const source = this.ingestDefinitions;
|
|
161
|
+
return source?.getModelElements
|
|
162
|
+
? source.getModelElements()
|
|
163
|
+
: [...definitions.values()].filter((read) => !(read instanceof CubeEngineError));
|
|
164
|
+
}
|
|
165
|
+
/** The model a data product cube's project is read from: the host's, else its deployed version's pointer */
|
|
166
|
+
async dataProductProjectModelOf(project) {
|
|
167
|
+
return this.dataProductModels?.getProjectModel(project);
|
|
150
168
|
}
|
|
151
169
|
/** An ingest model's settings, or an unsupported-model error naming its problems */
|
|
152
170
|
ingestSettingsOf(model, nodeId) {
|
|
@@ -376,7 +394,17 @@ export class V1_LegendCubeEngine {
|
|
|
376
394
|
new CubeEngineError(error.kind, error.detail, nodeId),
|
|
377
395
|
]));
|
|
378
396
|
}
|
|
379
|
-
|
|
397
|
+
let projectModel;
|
|
398
|
+
try {
|
|
399
|
+
projectModel = await this.dataProductProjectModelOf(project);
|
|
400
|
+
}
|
|
401
|
+
catch (error) {
|
|
402
|
+
return new Map([...lambdas.keys()].map((nodeId) => [
|
|
403
|
+
nodeId,
|
|
404
|
+
V1_toCubeEngineError(error, nodeId, CubeEngineErrorKind.COMPILE),
|
|
405
|
+
]));
|
|
406
|
+
}
|
|
407
|
+
return this.typeOn(V1_buildCubeDataProductTypingContext(project, projectModel), lambdas);
|
|
380
408
|
}
|
|
381
409
|
/**
|
|
382
410
|
* Types lambdas on an ingest cube: on the definitions they read, as the
|
|
@@ -426,7 +454,15 @@ export class V1_LegendCubeEngine {
|
|
|
426
454
|
typable.set(nodeId, ir);
|
|
427
455
|
}
|
|
428
456
|
});
|
|
429
|
-
|
|
457
|
+
let elements;
|
|
458
|
+
try {
|
|
459
|
+
elements = await this.ingestModelElementsOf(definitions);
|
|
460
|
+
}
|
|
461
|
+
catch (error) {
|
|
462
|
+
typable.forEach((_ir, nodeId) => typed.set(nodeId, toIngestError(error, CubeEngineErrorKind.COMPILE, nodeId)));
|
|
463
|
+
typable.clear();
|
|
464
|
+
elements = [];
|
|
465
|
+
}
|
|
430
466
|
(await this.typeOn(V1_buildCubeIngestTypingContext(elements), typable)).forEach((schema, nodeId) => typed.set(nodeId, schema));
|
|
431
467
|
// in the order the lambdas were given
|
|
432
468
|
return new Map([...lambdas.keys()].map((nodeId) => [
|
|
@@ -576,6 +612,23 @@ export class V1_LegendCubeEngine {
|
|
|
576
612
|
throw error;
|
|
577
613
|
}
|
|
578
614
|
}
|
|
615
|
+
async exportCsv(model, executionLambda, options) {
|
|
616
|
+
const captureId = captureNodeOf(executionLambda);
|
|
617
|
+
const context = await this.executionContextOf(model, executionLambda, captureId, options?.abortController);
|
|
618
|
+
try {
|
|
619
|
+
const body = this.executionBodyOf(model, context, executionLambda);
|
|
620
|
+
// the engine answers CSV under a JSON content type, and a failure as JSON with status 500 (PLAN §11.10)
|
|
621
|
+
const response = (await this.client.runQuery(body, {
|
|
622
|
+
returnAsResponse: true,
|
|
623
|
+
serializationFormat: EXECUTION_SERIALIZATION_FORMAT.CSV,
|
|
624
|
+
abortController: options?.abortController,
|
|
625
|
+
}));
|
|
626
|
+
return await response.text();
|
|
627
|
+
}
|
|
628
|
+
catch (error) {
|
|
629
|
+
throw V1_toCubeEngineError(error, captureId, CubeEngineErrorKind.EXECUTION);
|
|
630
|
+
}
|
|
631
|
+
}
|
|
579
632
|
/**
|
|
580
633
|
* The model a run on a data product cube runs on (PLAN §6.8): its project at
|
|
581
634
|
* the saved version, and a lakehouse runtime at Cube's fixed path, in the
|
|
@@ -598,7 +651,14 @@ export class V1_LegendCubeEngine {
|
|
|
598
651
|
? new CubeEngineError(error.kind, error.detail, captureId)
|
|
599
652
|
: new CubeEngineError(CubeEngineErrorKind.EXECUTION, error instanceof Error ? error.message : String(error), captureId);
|
|
600
653
|
}
|
|
601
|
-
|
|
654
|
+
let projectModel;
|
|
655
|
+
try {
|
|
656
|
+
projectModel = await this.dataProductProjectModelOf(project);
|
|
657
|
+
}
|
|
658
|
+
catch (error) {
|
|
659
|
+
throw V1_toCubeEngineError(error, captureId, CubeEngineErrorKind.EXECUTION);
|
|
660
|
+
}
|
|
661
|
+
return V1_buildCubeDataProductExecutionContext(project, environment, getEffectiveCubeWarehouse(project, this.getRememberedWarehouse()), projectModel);
|
|
602
662
|
}
|
|
603
663
|
/**
|
|
604
664
|
* The model a run on an ingest cube runs on (PLAN §6.7): the definitions it
|
|
@@ -618,13 +678,18 @@ export class V1_LegendCubeEngine {
|
|
|
618
678
|
throw new CubeEngineError(CubeEngineErrorKind.UNSUPPORTED_MODEL, NO_INGEST, captureId);
|
|
619
679
|
}
|
|
620
680
|
const definitions = await this.ingestDefinitionsOf(V1_getCubeIngestUrns(accessors), settings);
|
|
621
|
-
const elements = [];
|
|
622
681
|
definitions.forEach((read) => {
|
|
623
682
|
if (read instanceof CubeEngineError) {
|
|
624
683
|
throw toIngestError(read, CubeEngineErrorKind.EXECUTION, captureId);
|
|
625
684
|
}
|
|
626
|
-
elements.push(read);
|
|
627
685
|
});
|
|
686
|
+
let elements;
|
|
687
|
+
try {
|
|
688
|
+
elements = await this.ingestModelElementsOf(definitions);
|
|
689
|
+
}
|
|
690
|
+
catch (error) {
|
|
691
|
+
throw toIngestError(error, CubeEngineErrorKind.EXECUTION, captureId);
|
|
692
|
+
}
|
|
628
693
|
let environment;
|
|
629
694
|
try {
|
|
630
695
|
environment = await source.getRuntimeEnvironment(settings.environmentType);
|
|
@@ -722,6 +787,9 @@ export class V1_LegendCubeEngine {
|
|
|
722
787
|
throw new CubeEngineError(CubeEngineErrorKind.COMPILE, error.message);
|
|
723
788
|
}
|
|
724
789
|
}
|
|
790
|
+
serializeLambda(lambdaIR) {
|
|
791
|
+
return stringifyLosslessJSON(V1_serializeCubeLambda(lambdaIR), undefined, 2);
|
|
792
|
+
}
|
|
725
793
|
async renderPure(lambdaIR) {
|
|
726
794
|
try {
|
|
727
795
|
// sent as text, as typing and execution are: the serialized lambda holds
|