From 8ddd43b772bbbbe4eaae243794ddce3c5c83e9da Mon Sep 17 00:00:00 2001
From: Yannan <73408381+YannanGao-gs@users.noreply.github.com>
Date: Sat, 14 Sep 2024 07:20:55 -0400
Subject: [PATCH] include connection and store path in dataspace analytics
result (#3079)
---
.../pom.xml | 4 ++
.../analytics/DataSpaceAnalyticsHelper.java | 62 ++++++++++++++++++-
...taSpaceExecutionContextAnalysisResult.java | 1 +
...aSpaceExecutionContextRuntimeMetadata.java | 33 ++++++++++
...eAnalyticsArtifactGenerationExtension.java | 12 ++--
5 files changed, 104 insertions(+), 8 deletions(-)
create mode 100644 legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/main/java/org/finos/legend/engine/generation/analytics/model/DataSpaceExecutionContextRuntimeMetadata.java
diff --git a/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/pom.xml b/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/pom.xml
index 34b02ec1dae..792bbd5f2ac 100644
--- a/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/pom.xml
+++ b/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/pom.xml
@@ -132,6 +132,10 @@
org.finos.legend.engine
legend-engine-xt-analytics-binding-pure
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-protocol
+
diff --git a/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/main/java/org/finos/legend/engine/generation/analytics/DataSpaceAnalyticsHelper.java b/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/main/java/org/finos/legend/engine/generation/analytics/DataSpaceAnalyticsHelper.java
index ecebde0540c..500a8627577 100644
--- a/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/main/java/org/finos/legend/engine/generation/analytics/DataSpaceAnalyticsHelper.java
+++ b/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/main/java/org/finos/legend/engine/generation/analytics/DataSpaceAnalyticsHelper.java
@@ -39,6 +39,9 @@
import org.finos.legend.engine.protocol.pure.v1.model.context.PureModelContextData;
import org.finos.legend.engine.protocol.pure.v1.model.executionPlan.result.ResultType;
import org.finos.legend.engine.protocol.pure.v1.model.executionPlan.result.TDSResultType;
+import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.connection.Connection;
+import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.connection.ConnectionPointer;
+import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.connection.PackageableConnection;
import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.dataSpace.DataSpace;
import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.dataSpace.DataSpaceTemplateExecutable;
import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.domain.Function;
@@ -49,6 +52,7 @@
import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.service.PureMultiExecution;
import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.service.PureSingleExecution;
import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.service.Service;
+import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.RelationalDatabaseConnection;
import org.finos.legend.engine.protocol.pure.v1.model.valueSpecification.raw.executionContext.BaseExecutionContext;
import org.finos.legend.engine.pure.code.core.PureCoreExtensionLoader;
import org.finos.legend.engine.shared.core.api.grammar.RenderStyle;
@@ -58,13 +62,13 @@
import org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.extension.Profile;
import org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.ConcreteFunctionDefinition;
import org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.FunctionDefinition;
-import org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.LambdaFunction;
import org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.Class;
import org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.Enum;
import org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.Enumeration;
import java.util.ArrayList;
import java.util.List;
+import java.util.Optional;
import java.util.ServiceLoader;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@@ -255,6 +259,33 @@ public static DataSpaceAnalysisResult analyzeDataSpaceCoverage(Root_meta_pure_me
excResult.mapping = HelperModelBuilder.getElementFullPath(executionContext._mapping(), pureModel.getExecutionSupport());
excResult.defaultRuntime = HelperModelBuilder.getElementFullPath(executionContext._defaultRuntime(), pureModel.getExecutionSupport());
excResult.compatibleRuntimes = ListIterate.collect(executionContextAnalysisResult._compatibleRuntimes().toList(), runtime -> HelperModelBuilder.getElementFullPath(runtime, pureModel.getExecutionSupport()));
+ Optional packageableRuntime = pureModelContextData.getElements().stream().filter(e -> e.getPath().equals(excResult.defaultRuntime) && e instanceof PackageableRuntime).findFirst();
+ if (packageableRuntime.isPresent() && packageableRuntime.get() instanceof PackageableRuntime)
+ {
+ PackageableRuntime runtime = (PackageableRuntime) packageableRuntime.get();
+ if (runtime.runtimeValue.connections != null && !runtime.runtimeValue.connections.isEmpty() && !runtime.runtimeValue.connections.get(0).storeConnections.isEmpty())
+ {
+ String storePath = runtime.runtimeValue.connections.get(0).store.path;
+ Connection connection = runtime.runtimeValue.connections.get(0).storeConnections.get(0).connection;
+ if (connection instanceof ConnectionPointer)
+ {
+ String connectionPath = ((ConnectionPointer) connection).connection;
+ Optional packageableConnection = pureModelContextData.getElements().stream().filter(e -> e.getPath().equals(connectionPath)).findAny();
+ DataSpaceExecutionContextRuntimeMetadata metadata = new DataSpaceExecutionContextRuntimeMetadata(storePath, connectionPath);
+ if (packageableConnection.isPresent() && packageableConnection.get() instanceof PackageableConnection && ((PackageableConnection) packageableConnection.get()).connectionValue instanceof RelationalDatabaseConnection)
+ {
+ metadata.connectionType = ((RelationalDatabaseConnection) ((PackageableConnection) packageableConnection.get()).connectionValue).type.name();
+ }
+ excResult.runtimeMetadata = metadata;
+ }
+ else if (connection instanceof RelationalDatabaseConnection)
+ {
+ DataSpaceExecutionContextRuntimeMetadata metadata = new DataSpaceExecutionContextRuntimeMetadata(storePath, null);
+ metadata.connectionType = ((RelationalDatabaseConnection) connection).type.name();
+ excResult.runtimeMetadata = metadata;
+ }
+ }
+ }
Root_meta_analytics_mapping_modelCoverage_MappingModelCoverageAnalysisResult mappingModelCoverageAnalysisResult = executionContextAnalysisResult._mappingCoverage();
excResult.mappingModelCoverageAnalysisResult = buildMappingModelCoverageAnalysisResult(mappingModelCoverageAnalysisResult, excResult, pureModel, dataSpaceProtocol, pureModelContextData, clientVersion, generatorExtensions, entitlementServiceExtensions, false, returnLightGraph);
return excResult;
@@ -314,9 +345,36 @@ public static DataSpaceAnalysisResult analyzeDataSpace(Root_meta_pure_metamodel_
excResult.description = executionContext._description();
excResult.mapping = HelperModelBuilder.getElementFullPath(executionContext._mapping(), pureModel.getExecutionSupport());
excResult.defaultRuntime = HelperModelBuilder.getElementFullPath(executionContext._defaultRuntime(), pureModel.getExecutionSupport());
+ Optional packageableRuntime = pureModelContextData.getElements().stream().filter(e -> e.getPath().equals(excResult.defaultRuntime) && e instanceof PackageableRuntime).findFirst();
+ if (packageableRuntime.isPresent() && packageableRuntime.get() instanceof PackageableRuntime)
+ {
+ PackageableRuntime runtime = (PackageableRuntime) packageableRuntime.get();
+ if (runtime.runtimeValue.connections != null && !runtime.runtimeValue.connections.isEmpty() && !runtime.runtimeValue.connections.get(0).storeConnections.isEmpty())
+ {
+ String storePath = runtime.runtimeValue.connections.get(0).store.path;
+ Connection connection = runtime.runtimeValue.connections.get(0).storeConnections.get(0).connection;
+ if (connection instanceof ConnectionPointer)
+ {
+ String connectionPath = ((ConnectionPointer) connection).connection;
+ Optional packageableConnection = pureModelContextData.getElements().stream().filter(e -> e.getPath().equals(connectionPath)).findAny();
+ DataSpaceExecutionContextRuntimeMetadata metadata = new DataSpaceExecutionContextRuntimeMetadata(storePath, connectionPath);
+ if (packageableConnection.isPresent() && packageableConnection.get() instanceof PackageableConnection && ((PackageableConnection) packageableConnection.get()).connectionValue instanceof RelationalDatabaseConnection)
+ {
+ metadata.connectionType = ((RelationalDatabaseConnection) ((PackageableConnection) packageableConnection.get()).connectionValue).type.name();
+ }
+ excResult.runtimeMetadata = metadata;
+ }
+ else if (connection instanceof RelationalDatabaseConnection)
+ {
+ DataSpaceExecutionContextRuntimeMetadata metadata = new DataSpaceExecutionContextRuntimeMetadata(storePath, null);
+ metadata.connectionType = ((RelationalDatabaseConnection) connection).type.name();
+ excResult.runtimeMetadata = metadata;
+ }
+ }
+ }
excResult.compatibleRuntimes = ListIterate.collect(executionContextAnalysisResult._compatibleRuntimes().toList(), runtime -> HelperModelBuilder.getElementFullPath(runtime, pureModel.getExecutionSupport()));
Root_meta_analytics_mapping_modelCoverage_MappingModelCoverageAnalysisResult mappingModelCoverageAnalysisResult = executionContextAnalysisResult._mappingCoverage();
- excResult.mappingModelCoverageAnalysisResult = buildMappingModelCoverageAnalysisResult(mappingModelCoverageAnalysisResult, excResult, pureModel, dataSpaceProtocol, pureModelContextData, clientVersion, generatorExtensions, entitlementServiceExtensions, true, returnLightGraph);
+ excResult.mappingModelCoverageAnalysisResult = buildMappingModelCoverageAnalysisResult(mappingModelCoverageAnalysisResult, excResult, pureModel, dataSpaceProtocol, pureModelContextData, clientVersion, generatorExtensions, entitlementServiceExtensions, true, returnLightGraph);
return excResult;
});
result.defaultExecutionContext = dataSpace._defaultExecutionContext()._name();
diff --git a/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/main/java/org/finos/legend/engine/generation/analytics/model/DataSpaceExecutionContextAnalysisResult.java b/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/main/java/org/finos/legend/engine/generation/analytics/model/DataSpaceExecutionContextAnalysisResult.java
index 78dacd17564..87365d59b39 100644
--- a/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/main/java/org/finos/legend/engine/generation/analytics/model/DataSpaceExecutionContextAnalysisResult.java
+++ b/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/main/java/org/finos/legend/engine/generation/analytics/model/DataSpaceExecutionContextAnalysisResult.java
@@ -27,6 +27,7 @@ public class DataSpaceExecutionContextAnalysisResult
public String mapping;
public List compatibleRuntimes;
public String defaultRuntime;
+ public DataSpaceExecutionContextRuntimeMetadata runtimeMetadata;
public MappingModelCoverageAnalysisResult mappingModelCoverageAnalysisResult;
public List datasets;
}
diff --git a/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/main/java/org/finos/legend/engine/generation/analytics/model/DataSpaceExecutionContextRuntimeMetadata.java b/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/main/java/org/finos/legend/engine/generation/analytics/model/DataSpaceExecutionContextRuntimeMetadata.java
new file mode 100644
index 00000000000..c5eb82a2ae5
--- /dev/null
+++ b/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/main/java/org/finos/legend/engine/generation/analytics/model/DataSpaceExecutionContextRuntimeMetadata.java
@@ -0,0 +1,33 @@
+// Copyright 2022 Goldman Sachs
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.finos.legend.engine.generation.analytics.model;
+
+public class DataSpaceExecutionContextRuntimeMetadata
+{
+ public String storePath;
+ public String connectionPath;
+ public String connectionType;
+
+ public DataSpaceExecutionContextRuntimeMetadata()
+ {
+
+ }
+
+ public DataSpaceExecutionContextRuntimeMetadata(String storePath, String connectionPath)
+ {
+ this.storePath = storePath;
+ this.connectionPath = connectionPath;
+ }
+}
diff --git a/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/test/java/org/finos/legend/engine/generation/TestDataSpaceAnalyticsArtifactGenerationExtension.java b/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/test/java/org/finos/legend/engine/generation/TestDataSpaceAnalyticsArtifactGenerationExtension.java
index 0c5eb96876c..9aa76f05fe6 100644
--- a/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/test/java/org/finos/legend/engine/generation/TestDataSpaceAnalyticsArtifactGenerationExtension.java
+++ b/legend-engine-xts-data-space/legend-engine-xt-data-space-generation/src/test/java/org/finos/legend/engine/generation/TestDataSpaceAnalyticsArtifactGenerationExtension.java
@@ -91,7 +91,7 @@ public void testAnalyticsForBasicDataSpace() throws Exception
@Test
public void testAnalyticsForDataSpaceWithAssociation() throws Exception
{
- testDataSpaceAnalyticsArtifactGenerationExtension("models/dataSpaceWithAssociation.pure", "domain::COVIDDatapace", "{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"Not over yet?\",\"diagrams\":[{\"diagram\":\"domain::COVIDDataDiagram\",\"title\":\"\"}],\"elementDocs\":[],\"elements\":[],\"executables\":[],\"executionContexts\":[{\"compatibleRuntimes\":[\"runtime::MyRuntime\"],\"datasets\":[],\"defaultRuntime\":\"runtime::MyRuntime\",\"mapping\":\"mapping::CovidDataMapping\",\"mappingModelCoverageAnalysisResult\":{\"mappedEntities\":[]},\"name\":\"dummyContext\"},{\"compatibleRuntimes\":[\"runtime::MyRuntime\"],\"datasets\":[],\"defaultRuntime\":\"runtime::MyRuntime\",\"mapping\":\"mapping::CovidDataMapping\",\"mappingModelCoverageAnalysisResult\":{\"mappedEntities\":[]},\"name\":\"dummyContext2\"}],\"model\":{\"_type\":\"data\",\"elements\":[{\"_type\":\"class\",\"constraints\":[],\"name\":\"COVIDData\",\"originalMilestonedProperties\":[],\"package\":\"domain\",\"properties\":[{\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"id\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"Integer\"},{\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"fips\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"String\"},{\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"date\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"StrictDate\"},{\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"caseType\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"String\"},{\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"cases\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"Float\"},{\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"lastReportedFlag\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"Boolean\"},{\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"demographics\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"domain::Demographics\"}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"diagram\",\"classViews\":[{\"class\":\"domain::COVIDData\",\"id\":\"6b69f44b-f729-46aa-b244-ec5ee8164142\",\"position\":{\"x\":280.0,\"y\":159.0},\"rectangle\":{\"height\":128.0,\"width\":205.8291015625}},{\"class\":\"domain::Demographics\",\"id\":\"159e797e-ae75-437d-ba9c-253f99a48826\",\"position\":{\"x\":698.0,\"y\":238.0},\"rectangle\":{\"height\":58.0,\"width\":111.68994140625}},{\"class\":\"domain::Class1\",\"id\":\"f6bd8a50-8d18-4bd9-9a8d-7fad88d02b07\",\"position\":{\"x\":360.844970703125,\"y\":49.0},\"rectangle\":{\"height\":58.0,\"width\":137.390625}},{\"class\":\"domain::Class2\",\"id\":\"690e89d4-23e9-46e8-8543-c89c22cc9e15\",\"position\":{\"x\":696.844970703125,\"y\":95.0},\"rectangle\":{\"height\":44.0,\"width\":133.68994140625}}],\"generalizationViews\":[],\"name\":\"COVIDDataDiagram\",\"package\":\"domain\",\"propertyViews\":[{\"line\":{\"points\":[{\"x\":382.91455078125,\"y\":223.0},{\"x\":753.844970703125,\"y\":267.0}]},\"property\":{\"class\":\"domain::COVIDData\",\"property\":\"demographics\"},\"sourceView\":\"6b69f44b-f729-46aa-b244-ec5ee8164142\",\"targetView\":\"159e797e-ae75-437d-ba9c-253f99a48826\"},{\"line\":{\"points\":[{\"x\":763.68994140625,\"y\":117.0},{\"x\":429.540283203125,\"y\":78.0}]},\"property\":{\"class\":\"domain::Class2\",\"property\":\"fromClass1\"},\"sourceView\":\"690e89d4-23e9-46e8-8543-c89c22cc9e15\",\"targetView\":\"f6bd8a50-8d18-4bd9-9a8d-7fad88d02b07\"},{\"line\":{\"points\":[{\"x\":429.540283203125,\"y\":78.0},{\"x\":763.68994140625,\"y\":117.0}]},\"property\":{\"class\":\"domain::Class1\",\"property\":\"fromClass2\"},\"sourceView\":\"f6bd8a50-8d18-4bd9-9a8d-7fad88d02b07\",\"targetView\":\"690e89d4-23e9-46e8-8543-c89c22cc9e15\"}]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Class1\",\"originalMilestonedProperties\":[{\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"fromClass2\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"domain::Class2\"}],\"package\":\"domain\",\"properties\":[{\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"propClass1\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"String\"}],\"qualifiedProperties\":[],\"stereotypes\":[{\"profile\":\"meta::pure::profiles::temporal\",\"value\":\"businesstemporal\"}],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"association\",\"name\":\"Class12Assoc\",\"originalMilestonedProperties\":[{\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"fromClass1\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"domain::Class1\"},{\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"fromClass2\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"domain::Class2\"}],\"package\":\"domain\",\"properties\":[{\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"fromClass1\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"domain::Class1\"},{\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"fromClass2\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"domain::Class2\"}],\"qualifiedProperties\":[],\"stereotypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Class2\",\"originalMilestonedProperties\":[{\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"fromClass1\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"domain::Class1\"}],\"package\":\"domain\",\"properties\":[{\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"propClass2\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"String\"}],\"qualifiedProperties\":[],\"stereotypes\":[{\"profile\":\"meta::pure::profiles::temporal\",\"value\":\"processingtemporal\"}],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Demographics\",\"originalMilestonedProperties\":[],\"package\":\"domain\",\"properties\":[{\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"fips\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"String\"},{\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"state\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"String\"}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"BusinessDateMilestoning\",\"originalMilestonedProperties\":[],\"package\":\"meta::pure::milestoning\",\"properties\":[],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"ProcessingDateMilestoning\",\"originalMilestonedProperties\":[],\"package\":\"meta::pure::milestoning\",\"properties\":[],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"profile\",\"name\":\"temporal\",\"package\":\"meta::pure::profiles\",\"stereotypes\":[\"bitemporal\",\"businesstemporal\",\"processingtemporal\"],\"tags\":[]}]},\"name\":\"COVIDDatapace\",\"package\":\"domain\",\"path\":\"domain::COVIDDatapace\",\"stereotypes\":[],\"taggedValues\":[],\"title\":\"COVID Sample Data\"}");
+ testDataSpaceAnalyticsArtifactGenerationExtension("models/dataSpaceWithAssociation.pure", "domain::COVIDDatapace", "{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"Not over yet?\",\"diagrams\":[{\"diagram\":\"domain::COVIDDataDiagram\",\"title\":\"\"}],\"elementDocs\":[],\"elements\":[],\"executables\":[],\"executionContexts\":[{\"compatibleRuntimes\":[\"runtime::MyRuntime\"],\"datasets\":[],\"defaultRuntime\":\"runtime::MyRuntime\",\"mapping\":\"mapping::CovidDataMapping\",\"mappingModelCoverageAnalysisResult\":{\"mappedEntities\":[]},\"name\":\"dummyContext\",\"runtimeMetadata\":{\"connectionPath\":\"runtime::connection::MyConnection\",\"storePath\":\"ModelStore\"}},{\"compatibleRuntimes\":[\"runtime::MyRuntime\"],\"datasets\":[],\"defaultRuntime\":\"runtime::MyRuntime\",\"mapping\":\"mapping::CovidDataMapping\",\"mappingModelCoverageAnalysisResult\":{\"mappedEntities\":[]},\"name\":\"dummyContext2\",\"runtimeMetadata\":{\"connectionPath\":\"runtime::connection::MyConnection\",\"storePath\":\"ModelStore\"}}],\"model\":{\"_type\":\"data\",\"elements\":[{\"_type\":\"class\",\"constraints\":[],\"name\":\"COVIDData\",\"originalMilestonedProperties\":[],\"package\":\"domain\",\"properties\":[{\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"id\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"Integer\"},{\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"fips\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"String\"},{\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"date\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"StrictDate\"},{\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"caseType\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"String\"},{\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"cases\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"Float\"},{\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"lastReportedFlag\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"Boolean\"},{\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"demographics\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"domain::Demographics\"}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"diagram\",\"classViews\":[{\"class\":\"domain::COVIDData\",\"id\":\"6b69f44b-f729-46aa-b244-ec5ee8164142\",\"position\":{\"x\":280.0,\"y\":159.0},\"rectangle\":{\"height\":128.0,\"width\":205.8291015625}},{\"class\":\"domain::Demographics\",\"id\":\"159e797e-ae75-437d-ba9c-253f99a48826\",\"position\":{\"x\":698.0,\"y\":238.0},\"rectangle\":{\"height\":58.0,\"width\":111.68994140625}},{\"class\":\"domain::Class1\",\"id\":\"f6bd8a50-8d18-4bd9-9a8d-7fad88d02b07\",\"position\":{\"x\":360.844970703125,\"y\":49.0},\"rectangle\":{\"height\":58.0,\"width\":137.390625}},{\"class\":\"domain::Class2\",\"id\":\"690e89d4-23e9-46e8-8543-c89c22cc9e15\",\"position\":{\"x\":696.844970703125,\"y\":95.0},\"rectangle\":{\"height\":44.0,\"width\":133.68994140625}}],\"generalizationViews\":[],\"name\":\"COVIDDataDiagram\",\"package\":\"domain\",\"propertyViews\":[{\"line\":{\"points\":[{\"x\":382.91455078125,\"y\":223.0},{\"x\":753.844970703125,\"y\":267.0}]},\"property\":{\"class\":\"domain::COVIDData\",\"property\":\"demographics\"},\"sourceView\":\"6b69f44b-f729-46aa-b244-ec5ee8164142\",\"targetView\":\"159e797e-ae75-437d-ba9c-253f99a48826\"},{\"line\":{\"points\":[{\"x\":763.68994140625,\"y\":117.0},{\"x\":429.540283203125,\"y\":78.0}]},\"property\":{\"class\":\"domain::Class2\",\"property\":\"fromClass1\"},\"sourceView\":\"690e89d4-23e9-46e8-8543-c89c22cc9e15\",\"targetView\":\"f6bd8a50-8d18-4bd9-9a8d-7fad88d02b07\"},{\"line\":{\"points\":[{\"x\":429.540283203125,\"y\":78.0},{\"x\":763.68994140625,\"y\":117.0}]},\"property\":{\"class\":\"domain::Class1\",\"property\":\"fromClass2\"},\"sourceView\":\"f6bd8a50-8d18-4bd9-9a8d-7fad88d02b07\",\"targetView\":\"690e89d4-23e9-46e8-8543-c89c22cc9e15\"}]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Class1\",\"originalMilestonedProperties\":[{\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"fromClass2\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"domain::Class2\"}],\"package\":\"domain\",\"properties\":[{\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"propClass1\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"String\"}],\"qualifiedProperties\":[],\"stereotypes\":[{\"profile\":\"meta::pure::profiles::temporal\",\"value\":\"businesstemporal\"}],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"association\",\"name\":\"Class12Assoc\",\"originalMilestonedProperties\":[{\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"fromClass1\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"domain::Class1\"},{\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"fromClass2\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"domain::Class2\"}],\"package\":\"domain\",\"properties\":[{\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"fromClass1\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"domain::Class1\"},{\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"fromClass2\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"domain::Class2\"}],\"qualifiedProperties\":[],\"stereotypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Class2\",\"originalMilestonedProperties\":[{\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"fromClass1\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"domain::Class1\"}],\"package\":\"domain\",\"properties\":[{\"multiplicity\":{\"lowerBound\":1,\"upperBound\":1},\"name\":\"propClass2\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"String\"}],\"qualifiedProperties\":[],\"stereotypes\":[{\"profile\":\"meta::pure::profiles::temporal\",\"value\":\"processingtemporal\"}],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"Demographics\",\"originalMilestonedProperties\":[],\"package\":\"domain\",\"properties\":[{\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"fips\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"String\"},{\"multiplicity\":{\"lowerBound\":0,\"upperBound\":1},\"name\":\"state\",\"stereotypes\":[],\"taggedValues\":[],\"type\":\"String\"}],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"BusinessDateMilestoning\",\"originalMilestonedProperties\":[],\"package\":\"meta::pure::milestoning\",\"properties\":[],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"class\",\"constraints\":[],\"name\":\"ProcessingDateMilestoning\",\"originalMilestonedProperties\":[],\"package\":\"meta::pure::milestoning\",\"properties\":[],\"qualifiedProperties\":[],\"stereotypes\":[],\"superTypes\":[],\"taggedValues\":[]},{\"_type\":\"profile\",\"name\":\"temporal\",\"package\":\"meta::pure::profiles\",\"stereotypes\":[\"bitemporal\",\"businesstemporal\",\"processingtemporal\"],\"tags\":[]}]},\"name\":\"COVIDDatapace\",\"package\":\"domain\",\"path\":\"domain::COVIDDatapace\",\"stereotypes\":[],\"taggedValues\":[],\"title\":\"COVID Sample Data\"}");
}
@Test
@@ -115,30 +115,30 @@ public void testAnalyticsForDataSpaceWithMilestoningElements() throws Exception
@Test
public void testAnalyticsForDataSpaceWithExecutables() throws Exception
{
- testDataSpaceAnalyticsArtifactGenerationExtension("models/dataSpaceWithExecutables.pure", "domain::COVIDDataspace", "{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"# Peleus rupit\\n\\n## Sum super gerens paterque\\n\\nLorem markdownum presso, et tamen cogitis, Taenarius lactantia fluxerunt\\nterrita, vota. Tempore flumina ferrumque bella.\\n\\n- Per dixit\\n- Truces tellusque indignata ducem\\n- Cervice venitis cavernis minus\\n\\n## Tum ausus fovebam incursus magis dici extemplo\\n\\nPiscator degenerat desertaque quid scelus tyranni feror ipsa mortis nec silva\\nsparsus neci cum? Est patulas meam decorem, dat demit corpora exuritque Ulixes,\\ngenitore. Captare certa amore pressos, Diamque\\n[traxit](http://istecondar.net/ministropudoris) devorat duritia ecce, capillos\\nfuerint progenitore curva relictas. Iubae pectus et quateret, non vires tibi\\ncacumina figuram Antigonen rursus verti.\\n\\n## Dicta nec Thestiadae tristi exempla sed suoque\\n\\nFlumina quae loricaeque meruique defensae *me terram* tamen attollere totum\\nneque nullos. Quem plus, stratum.\\n\\n## Quaeque si reddite summoque vultu Teleboasque vincere\\n\\nIsmariae me munus umbram. Usum pedem multis quotiensque mirantum Cephenum et\\namori Procne locutum auctor Volturnus pavent virgineas.\\n\\n if (edi + sidebarTooltip < aiffDisk) {\\n drive_key_firewire += bank(searchHardBoot(bus, packet_click));\\n }\\n var adRow = dlc_rootkit(rdramMegabit) - hertzBanner * 2 +\\n memory_adc.horizontal(class_box_rte, disk, lte_grep);\\n if (grayscale) {\\n spool_windows_metal.zif_firewire *= 3;\\n emoticon_mp = user.thunderboltIcqBus.installer_remote(4, searchCable) *\\n kibibyteYoutubeRaster.simm(-3, nosqlCharacter, sip);\\n }\\n var blob = -2;\\n\\n## Est magis interdum in luctus\\n\\nPrimus illa sub bis infregit saepe agrestem Cyllare lumen cultrosque **Cnosia**.\\nSuis est fero durisque satis.\\n\\n- Nos quas est maesta aliquis se unum\\n- Tu ossa Cupido sagitta hanc inflati profuso\\n- Modo est proles pavor\\n- Stillabant pallada invitaque et tantum dictaque in\\n- Generum coegi tum edaci\\n\\nSuo nec cerae me omnem Famemque, passi si auditque ullo, praebita. Gravi annos\\npudore formidabilis erat pectora perpetuo qua oscula cum ad sed Nabataeus\\nRomethiumque deum Erectheus? O Victoria rostro utque terras vitisque classe.\\nTibi [miserrima hirta](http://decentia-qui.net/docta-petentem), eratis saepius\\ntuus.\",\"diagrams\":[],\"elementDocs\":[],\"elements\":[],\"executables\":[{\"description\":\"Some exec description\",\"executable\":\"service::CovidDataMulti\",\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"Exec 1\"},{\"description\":\"Some more exec description\",\"executable\":\"service::CovidDataSingle\",\"info\":{\"_type\":\"service\",\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"H2\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"H2\"}],\"mapping\":\"mapping::CovidDataMapping\",\"pattern\":\"/9566f101-2108-408f-863f-6d7e154dc17b\",\"query\":\"|domain::COVIDData.all()->project(\\n [\\n x: domain::COVIDData[1]|$x.cases\\n ],\\n ['Cases']\\n)\",\"runtime\":\"runtime::H2Runtime\"},\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"Exec 2\"}],\"executionContexts\":[{\"compatibleRuntimes\":[\"runtime::H2Runtime\"],\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"H2\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"H2\"}],\"defaultRuntime\":\"runtime::H2Runtime\",\"mapping\":\"mapping::CovidDataMapping\",\"mappingModelCoverageAnalysisResult\":{\"mappedEntities\":[{\"path\":\"domain::COVIDData\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"caseType\"},{\"_type\":\"MappedProperty\",\"name\":\"cases\"},{\"_type\":\"MappedProperty\",\"name\":\"date\"},{\"_type\":\"entity\",\"entityPath\":\"domain::Demographics\",\"name\":\"demographics\"},{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"id\"},{\"_type\":\"MappedProperty\",\"name\":\"lastReportedFlag\"}]},{\"path\":\"domain::Demographics\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"state\"}]}]},\"name\":\"dummyContext\"}],\"model\":{\"_type\":\"data\",\"elements\":[]},\"name\":\"COVIDDataspace\",\"package\":\"domain\",\"path\":\"domain::COVIDDataspace\",\"stereotypes\":[],\"taggedValues\":[],\"title\":\"COVID Sample Data\"}");
+ testDataSpaceAnalyticsArtifactGenerationExtension("models/dataSpaceWithExecutables.pure", "domain::COVIDDataspace", "{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"# Peleus rupit\\n\\n## Sum super gerens paterque\\n\\nLorem markdownum presso, et tamen cogitis, Taenarius lactantia fluxerunt\\nterrita, vota. Tempore flumina ferrumque bella.\\n\\n- Per dixit\\n- Truces tellusque indignata ducem\\n- Cervice venitis cavernis minus\\n\\n## Tum ausus fovebam incursus magis dici extemplo\\n\\nPiscator degenerat desertaque quid scelus tyranni feror ipsa mortis nec silva\\nsparsus neci cum? Est patulas meam decorem, dat demit corpora exuritque Ulixes,\\ngenitore. Captare certa amore pressos, Diamque\\n[traxit](http://istecondar.net/ministropudoris) devorat duritia ecce, capillos\\nfuerint progenitore curva relictas. Iubae pectus et quateret, non vires tibi\\ncacumina figuram Antigonen rursus verti.\\n\\n## Dicta nec Thestiadae tristi exempla sed suoque\\n\\nFlumina quae loricaeque meruique defensae *me terram* tamen attollere totum\\nneque nullos. Quem plus, stratum.\\n\\n## Quaeque si reddite summoque vultu Teleboasque vincere\\n\\nIsmariae me munus umbram. Usum pedem multis quotiensque mirantum Cephenum et\\namori Procne locutum auctor Volturnus pavent virgineas.\\n\\n if (edi + sidebarTooltip < aiffDisk) {\\n drive_key_firewire += bank(searchHardBoot(bus, packet_click));\\n }\\n var adRow = dlc_rootkit(rdramMegabit) - hertzBanner * 2 +\\n memory_adc.horizontal(class_box_rte, disk, lte_grep);\\n if (grayscale) {\\n spool_windows_metal.zif_firewire *= 3;\\n emoticon_mp = user.thunderboltIcqBus.installer_remote(4, searchCable) *\\n kibibyteYoutubeRaster.simm(-3, nosqlCharacter, sip);\\n }\\n var blob = -2;\\n\\n## Est magis interdum in luctus\\n\\nPrimus illa sub bis infregit saepe agrestem Cyllare lumen cultrosque **Cnosia**.\\nSuis est fero durisque satis.\\n\\n- Nos quas est maesta aliquis se unum\\n- Tu ossa Cupido sagitta hanc inflati profuso\\n- Modo est proles pavor\\n- Stillabant pallada invitaque et tantum dictaque in\\n- Generum coegi tum edaci\\n\\nSuo nec cerae me omnem Famemque, passi si auditque ullo, praebita. Gravi annos\\npudore formidabilis erat pectora perpetuo qua oscula cum ad sed Nabataeus\\nRomethiumque deum Erectheus? O Victoria rostro utque terras vitisque classe.\\nTibi [miserrima hirta](http://decentia-qui.net/docta-petentem), eratis saepius\\ntuus.\",\"diagrams\":[],\"elementDocs\":[],\"elements\":[],\"executables\":[{\"description\":\"Some exec description\",\"executable\":\"service::CovidDataMulti\",\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"Exec 1\"},{\"description\":\"Some more exec description\",\"executable\":\"service::CovidDataSingle\",\"info\":{\"_type\":\"service\",\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"H2\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"H2\"}],\"mapping\":\"mapping::CovidDataMapping\",\"pattern\":\"/9566f101-2108-408f-863f-6d7e154dc17b\",\"query\":\"|domain::COVIDData.all()->project(\\n [\\n x: domain::COVIDData[1]|$x.cases\\n ],\\n ['Cases']\\n)\",\"runtime\":\"runtime::H2Runtime\"},\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"Exec 2\"}],\"executionContexts\":[{\"compatibleRuntimes\":[\"runtime::H2Runtime\"],\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"H2\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"H2\"}],\"defaultRuntime\":\"runtime::H2Runtime\",\"mapping\":\"mapping::CovidDataMapping\",\"mappingModelCoverageAnalysisResult\":{\"mappedEntities\":[{\"path\":\"domain::COVIDData\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"caseType\"},{\"_type\":\"MappedProperty\",\"name\":\"cases\"},{\"_type\":\"MappedProperty\",\"name\":\"date\"},{\"_type\":\"entity\",\"entityPath\":\"domain::Demographics\",\"name\":\"demographics\"},{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"id\"},{\"_type\":\"MappedProperty\",\"name\":\"lastReportedFlag\"}]},{\"path\":\"domain::Demographics\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"state\"}]}]},\"name\":\"dummyContext\",\"runtimeMetadata\":{\"connectionPath\":\"runtime::connection::H2Connection\",\"connectionType\":\"H2\",\"storePath\":\"store::CovidDataStore\"}}],\"model\":{\"_type\":\"data\",\"elements\":[]},\"name\":\"COVIDDataspace\",\"package\":\"domain\",\"path\":\"domain::COVIDDataspace\",\"stereotypes\":[],\"taggedValues\":[],\"title\":\"COVID Sample Data\"}");
}
@Test
public void testAnalyticsForDataSpaceTemplateWithExecutablesWithInlineQuery() throws Exception
{
- testDataSpaceAnalyticsArtifactGenerationExtension("models/dataSpaceWithTemplateExecutablesWithInlineQuery.pure", "domain::COVIDDataspace", "{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"this is description of this COVIDDataspace\",\"diagrams\":[],\"elementDocs\":[],\"elements\":[],\"executables\":[{\"description\":\"Some more exec description\",\"info\":{\"_type\":\"templateExecutableInfo\",\"executionContextKey\":\"dummyContext\",\"id\":\"1\",\"query\":\"|domain::COVIDData.all()->project([x: domain::COVIDData[1]|$x.cases], ['Cases'])\"},\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"this is template\"},{\"info\":{\"_type\":\"templateExecutableInfo\",\"executionContextKey\":\"dummyContext\",\"id\":\"2\",\"query\":\"|domain::COVIDData.all()->project([x: domain::COVIDData[1]|$x.fips], ['Fips'])\"},\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Fips\",\"relationalType\":\"VARCHAR(200)\",\"type\":\"String\"}]},\"title\":\"this is template2\"}],\"executionContexts\":[{\"compatibleRuntimes\":[\"runtime::H2Runtime\"],\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"H2\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"H2\"}],\"defaultRuntime\":\"runtime::H2Runtime\",\"mapping\":\"mapping::CovidDataMapping\",\"mappingModelCoverageAnalysisResult\":{\"mappedEntities\":[{\"path\":\"domain::COVIDData\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"caseType\"},{\"_type\":\"MappedProperty\",\"name\":\"cases\"},{\"_type\":\"MappedProperty\",\"name\":\"date\"},{\"_type\":\"entity\",\"entityPath\":\"domain::Demographics\",\"name\":\"demographics\"},{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"id\"},{\"_type\":\"MappedProperty\",\"name\":\"lastReportedFlag\"}]},{\"path\":\"domain::Demographics\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"state\"}]}]},\"name\":\"dummyContext\"}],\"model\":{\"_type\":\"data\",\"elements\":[]},\"name\":\"COVIDDataspace\",\"package\":\"domain\",\"path\":\"domain::COVIDDataspace\",\"stereotypes\":[],\"taggedValues\":[],\"title\":\"COVID Sample Data\"}");
+ testDataSpaceAnalyticsArtifactGenerationExtension("models/dataSpaceWithTemplateExecutablesWithInlineQuery.pure", "domain::COVIDDataspace", "{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"this is description of this COVIDDataspace\",\"diagrams\":[],\"elementDocs\":[],\"elements\":[],\"executables\":[{\"description\":\"Some more exec description\",\"info\":{\"_type\":\"templateExecutableInfo\",\"executionContextKey\":\"dummyContext\",\"id\":\"1\",\"query\":\"|domain::COVIDData.all()->project([x: domain::COVIDData[1]|$x.cases], ['Cases'])\"},\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"this is template\"},{\"info\":{\"_type\":\"templateExecutableInfo\",\"executionContextKey\":\"dummyContext\",\"id\":\"2\",\"query\":\"|domain::COVIDData.all()->project([x: domain::COVIDData[1]|$x.fips], ['Fips'])\"},\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Fips\",\"relationalType\":\"VARCHAR(200)\",\"type\":\"String\"}]},\"title\":\"this is template2\"}],\"executionContexts\":[{\"compatibleRuntimes\":[\"runtime::H2Runtime\"],\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"H2\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"H2\"}],\"defaultRuntime\":\"runtime::H2Runtime\",\"mapping\":\"mapping::CovidDataMapping\",\"mappingModelCoverageAnalysisResult\":{\"mappedEntities\":[{\"path\":\"domain::COVIDData\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"caseType\"},{\"_type\":\"MappedProperty\",\"name\":\"cases\"},{\"_type\":\"MappedProperty\",\"name\":\"date\"},{\"_type\":\"entity\",\"entityPath\":\"domain::Demographics\",\"name\":\"demographics\"},{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"id\"},{\"_type\":\"MappedProperty\",\"name\":\"lastReportedFlag\"}]},{\"path\":\"domain::Demographics\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"state\"}]}]},\"name\":\"dummyContext\",\"runtimeMetadata\":{\"connectionPath\":\"runtime::connection::H2Connection\",\"connectionType\":\"H2\",\"storePath\":\"store::CovidDataStore\"}}],\"model\":{\"_type\":\"data\",\"elements\":[]},\"name\":\"COVIDDataspace\",\"package\":\"domain\",\"path\":\"domain::COVIDDataspace\",\"stereotypes\":[],\"taggedValues\":[],\"title\":\"COVID Sample Data\"}");
}
@Test
public void testAnalyticsForDataSpaceWithExecutableWithFunctionPointer() throws Exception
{
- testDataSpaceAnalyticsArtifactGenerationExtension("models/dataSpaceWithExecutablesWithFunctionPointer.pure", "domain::COVIDDataspace", "{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"this is description of this COVIDDataspace\",\"diagrams\":[],\"elementDocs\":[],\"elements\":[],\"executables\":[{\"description\":\"Some more exec description\",\"executable\":\"domain::COVIDData_QueryFunction__TabularDataSet_1_\",\"info\":{\"_type\":\"functionPointerExecutableInfo\",\"executionContextKey\":\"dummyContext\",\"function\":\"domain::COVIDData_QueryFunction__TabularDataSet_1_\",\"id\":\"1\",\"query\":\"function domain::COVIDData_QueryFunction(): meta::pure::tds::TabularDataSet[1]\\n{\\n domain::COVIDData.all()->project([x: domain::COVIDData[1]|$x.cases], ['Cases'])->from(mapping::CovidDataMapping, runtime::H2Runtime)\\n}\"},\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"this is template\"},{\"executable\":\"domain::COVIDData_QueryFunction__TabularDataSet_1_\",\"info\":{\"_type\":\"functionPointerExecutableInfo\",\"executionContextKey\":\"dummyContext\",\"function\":\"domain::COVIDData_QueryFunction__TabularDataSet_1_\",\"id\":\"2\",\"query\":\"function domain::COVIDData_QueryFunction(): meta::pure::tds::TabularDataSet[1]\\n{\\n domain::COVIDData.all()->project([x: domain::COVIDData[1]|$x.cases], ['Cases'])->from(mapping::CovidDataMapping, runtime::H2Runtime)\\n}\"},\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"this is template2\"}],\"executionContexts\":[{\"compatibleRuntimes\":[\"runtime::H2Runtime\"],\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"H2\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"H2\"}],\"defaultRuntime\":\"runtime::H2Runtime\",\"mapping\":\"mapping::CovidDataMapping\",\"mappingModelCoverageAnalysisResult\":{\"mappedEntities\":[{\"path\":\"domain::COVIDData\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"caseType\"},{\"_type\":\"MappedProperty\",\"name\":\"cases\"},{\"_type\":\"MappedProperty\",\"name\":\"date\"},{\"_type\":\"entity\",\"entityPath\":\"domain::Demographics\",\"name\":\"demographics\"},{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"id\"},{\"_type\":\"MappedProperty\",\"name\":\"lastReportedFlag\"}]},{\"path\":\"domain::Demographics\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"state\"}]}]},\"name\":\"dummyContext\"}],\"model\":{\"_type\":\"data\",\"elements\":[]},\"name\":\"COVIDDataspace\",\"package\":\"domain\",\"path\":\"domain::COVIDDataspace\",\"stereotypes\":[],\"taggedValues\":[],\"title\":\"COVID Sample Data\"}");
+ testDataSpaceAnalyticsArtifactGenerationExtension("models/dataSpaceWithExecutablesWithFunctionPointer.pure", "domain::COVIDDataspace","{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"this is description of this COVIDDataspace\",\"diagrams\":[],\"elementDocs\":[],\"elements\":[],\"executables\":[{\"description\":\"Some more exec description\",\"executable\":\"domain::COVIDData_QueryFunction__TabularDataSet_1_\",\"info\":{\"_type\":\"functionPointerExecutableInfo\",\"executionContextKey\":\"dummyContext\",\"function\":\"domain::COVIDData_QueryFunction__TabularDataSet_1_\",\"id\":\"1\",\"query\":\"function domain::COVIDData_QueryFunction(): meta::pure::tds::TabularDataSet[1]\\n{\\n domain::COVIDData.all()->project([x: domain::COVIDData[1]|$x.cases], ['Cases'])->from(mapping::CovidDataMapping, runtime::H2Runtime)\\n}\"},\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"this is template\"},{\"executable\":\"domain::COVIDData_QueryFunction__TabularDataSet_1_\",\"info\":{\"_type\":\"functionPointerExecutableInfo\",\"executionContextKey\":\"dummyContext\",\"function\":\"domain::COVIDData_QueryFunction__TabularDataSet_1_\",\"id\":\"2\",\"query\":\"function domain::COVIDData_QueryFunction(): meta::pure::tds::TabularDataSet[1]\\n{\\n domain::COVIDData.all()->project([x: domain::COVIDData[1]|$x.cases], ['Cases'])->from(mapping::CovidDataMapping, runtime::H2Runtime)\\n}\"},\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"this is template2\"}],\"executionContexts\":[{\"compatibleRuntimes\":[\"runtime::H2Runtime\"],\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"H2\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"H2\"}],\"defaultRuntime\":\"runtime::H2Runtime\",\"mapping\":\"mapping::CovidDataMapping\",\"mappingModelCoverageAnalysisResult\":{\"mappedEntities\":[{\"path\":\"domain::COVIDData\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"caseType\"},{\"_type\":\"MappedProperty\",\"name\":\"cases\"},{\"_type\":\"MappedProperty\",\"name\":\"date\"},{\"_type\":\"entity\",\"entityPath\":\"domain::Demographics\",\"name\":\"demographics\"},{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"id\"},{\"_type\":\"MappedProperty\",\"name\":\"lastReportedFlag\"}]},{\"path\":\"domain::Demographics\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"state\"}]}]},\"name\":\"dummyContext\",\"runtimeMetadata\":{\"connectionPath\":\"runtime::connection::H2Connection\",\"connectionType\":\"H2\",\"storePath\":\"store::CovidDataStore\"}}],\"model\":{\"_type\":\"data\",\"elements\":[]},\"name\":\"COVIDDataspace\",\"package\":\"domain\",\"path\":\"domain::COVIDDataspace\",\"stereotypes\":[],\"taggedValues\":[],\"title\":\"COVID Sample Data\"}");
}
@Test
public void testAnalyticsForDataSpaceWithAccessEntitlementsToH2() throws Exception
{
- testDataSpaceAnalyticsArtifactGenerationExtension("models/dataspaceAccessAnalytics.pure", "domain::COVIDDataspace", "{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"# Peleus rupit\\n\\n## Sum super gerens paterque\\n\\nLorem markdownum presso, et tamen cogitis, Taenarius lactantia fluxerunt\\nterrita, vota. Tempore flumina ferrumque bella.\\n\\n- Per dixit\\n- Truces tellusque indignata ducem\\n- Cervice venitis cavernis minus\\n\\n## Tum ausus fovebam incursus magis dici extemplo\\n\\nPiscator degenerat desertaque quid scelus tyranni feror ipsa mortis nec silva\\nsparsus neci cum? Est patulas meam decorem, dat demit corpora exuritque Ulixes,\\ngenitore. Captare certa amore pressos, Diamque\\n[traxit](http://istecondar.net/ministropudoris) devorat duritia ecce, capillos\\nfuerint progenitore curva relictas. Iubae pectus et quateret, non vires tibi\\ncacumina figuram Antigonen rursus verti.\\n\\n## Dicta nec Thestiadae tristi exempla sed suoque\\n\\nFlumina quae loricaeque meruique defensae *me terram* tamen attollere totum\\nneque nullos. Quem plus, stratum.\\n\\n## Quaeque si reddite summoque vultu Teleboasque vincere\\n\\nIsmariae me munus umbram. Usum pedem multis quotiensque mirantum Cephenum et\\namori Procne locutum auctor Volturnus pavent virgineas.\\n\\n if (edi + sidebarTooltip < aiffDisk) {\\n drive_key_firewire += bank(searchHardBoot(bus, packet_click));\\n }\\n var adRow = dlc_rootkit(rdramMegabit) - hertzBanner * 2 +\\n memory_adc.horizontal(class_box_rte, disk, lte_grep);\\n if (grayscale) {\\n spool_windows_metal.zif_firewire *= 3;\\n emoticon_mp = user.thunderboltIcqBus.installer_remote(4, searchCable) *\\n kibibyteYoutubeRaster.simm(-3, nosqlCharacter, sip);\\n }\\n var blob = -2;\\n\\n## Est magis interdum in luctus\\n\\nPrimus illa sub bis infregit saepe agrestem Cyllare lumen cultrosque **Cnosia**.\\nSuis est fero durisque satis.\\n\\n- Nos quas est maesta aliquis se unum\\n- Tu ossa Cupido sagitta hanc inflati profuso\\n- Modo est proles pavor\\n- Stillabant pallada invitaque et tantum dictaque in\\n- Generum coegi tum edaci\\n\\nSuo nec cerae me omnem Famemque, passi si auditque ullo, praebita. Gravi annos\\npudore formidabilis erat pectora perpetuo qua oscula cum ad sed Nabataeus\\nRomethiumque deum Erectheus? O Victoria rostro utque terras vitisque classe.\\nTibi [miserrima hirta](http://decentia-qui.net/docta-petentem), eratis saepius\\ntuus.\",\"diagrams\":[],\"elementDocs\":[],\"elements\":[],\"executables\":[{\"description\":\"Some exec description\",\"executable\":\"service::CovidDataMulti\",\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"Exec 1\"},{\"description\":\"Some more exec description\",\"executable\":\"service::CovidDataSingle\",\"info\":{\"_type\":\"service\",\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"H2\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"H2\"}],\"mapping\":\"mapping::CovidDataMapping\",\"pattern\":\"/9566f101-2108-408f-863f-6d7e154dc17b\",\"query\":\"|domain::COVIDData.all()->project(\\n [\\n x: domain::COVIDData[1]|$x.cases\\n ],\\n ['Cases']\\n)\",\"runtime\":\"runtime::H2Runtime\"},\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"Exec 2\"}],\"executionContexts\":[{\"compatibleRuntimes\":[\"runtime::H2Runtime\",\"runtime::SnowflakeRuntime\"],\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"H2\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"H2\"}],\"defaultRuntime\":\"runtime::H2Runtime\",\"mapping\":\"mapping::CovidDataMapping\",\"mappingModelCoverageAnalysisResult\":{\"mappedEntities\":[{\"path\":\"domain::COVIDData\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"caseType\"},{\"_type\":\"MappedProperty\",\"name\":\"cases\"},{\"_type\":\"MappedProperty\",\"name\":\"date\"},{\"_type\":\"entity\",\"entityPath\":\"domain::Demographics\",\"name\":\"demographics\"},{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"id\"},{\"_type\":\"MappedProperty\",\"name\":\"lastReportedFlag\"}]},{\"path\":\"domain::Demographics\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"state\"}]}]},\"name\":\"dummyContext\"}],\"model\":{\"_type\":\"data\",\"elements\":[]},\"name\":\"COVIDDataspace\",\"package\":\"domain\",\"path\":\"domain::COVIDDataspace\",\"stereotypes\":[],\"taggedValues\":[],\"title\":\"COVID Sample Data\"}");
+ testDataSpaceAnalyticsArtifactGenerationExtension("models/dataspaceAccessAnalytics.pure", "domain::COVIDDataspace","{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"# Peleus rupit\\n\\n## Sum super gerens paterque\\n\\nLorem markdownum presso, et tamen cogitis, Taenarius lactantia fluxerunt\\nterrita, vota. Tempore flumina ferrumque bella.\\n\\n- Per dixit\\n- Truces tellusque indignata ducem\\n- Cervice venitis cavernis minus\\n\\n## Tum ausus fovebam incursus magis dici extemplo\\n\\nPiscator degenerat desertaque quid scelus tyranni feror ipsa mortis nec silva\\nsparsus neci cum? Est patulas meam decorem, dat demit corpora exuritque Ulixes,\\ngenitore. Captare certa amore pressos, Diamque\\n[traxit](http://istecondar.net/ministropudoris) devorat duritia ecce, capillos\\nfuerint progenitore curva relictas. Iubae pectus et quateret, non vires tibi\\ncacumina figuram Antigonen rursus verti.\\n\\n## Dicta nec Thestiadae tristi exempla sed suoque\\n\\nFlumina quae loricaeque meruique defensae *me terram* tamen attollere totum\\nneque nullos. Quem plus, stratum.\\n\\n## Quaeque si reddite summoque vultu Teleboasque vincere\\n\\nIsmariae me munus umbram. Usum pedem multis quotiensque mirantum Cephenum et\\namori Procne locutum auctor Volturnus pavent virgineas.\\n\\n if (edi + sidebarTooltip < aiffDisk) {\\n drive_key_firewire += bank(searchHardBoot(bus, packet_click));\\n }\\n var adRow = dlc_rootkit(rdramMegabit) - hertzBanner * 2 +\\n memory_adc.horizontal(class_box_rte, disk, lte_grep);\\n if (grayscale) {\\n spool_windows_metal.zif_firewire *= 3;\\n emoticon_mp = user.thunderboltIcqBus.installer_remote(4, searchCable) *\\n kibibyteYoutubeRaster.simm(-3, nosqlCharacter, sip);\\n }\\n var blob = -2;\\n\\n## Est magis interdum in luctus\\n\\nPrimus illa sub bis infregit saepe agrestem Cyllare lumen cultrosque **Cnosia**.\\nSuis est fero durisque satis.\\n\\n- Nos quas est maesta aliquis se unum\\n- Tu ossa Cupido sagitta hanc inflati profuso\\n- Modo est proles pavor\\n- Stillabant pallada invitaque et tantum dictaque in\\n- Generum coegi tum edaci\\n\\nSuo nec cerae me omnem Famemque, passi si auditque ullo, praebita. Gravi annos\\npudore formidabilis erat pectora perpetuo qua oscula cum ad sed Nabataeus\\nRomethiumque deum Erectheus? O Victoria rostro utque terras vitisque classe.\\nTibi [miserrima hirta](http://decentia-qui.net/docta-petentem), eratis saepius\\ntuus.\",\"diagrams\":[],\"elementDocs\":[],\"elements\":[],\"executables\":[{\"description\":\"Some exec description\",\"executable\":\"service::CovidDataMulti\",\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"Exec 1\"},{\"description\":\"Some more exec description\",\"executable\":\"service::CovidDataSingle\",\"info\":{\"_type\":\"service\",\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"H2\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"H2\"}],\"mapping\":\"mapping::CovidDataMapping\",\"pattern\":\"/9566f101-2108-408f-863f-6d7e154dc17b\",\"query\":\"|domain::COVIDData.all()->project(\\n [\\n x: domain::COVIDData[1]|$x.cases\\n ],\\n ['Cases']\\n)\",\"runtime\":\"runtime::H2Runtime\"},\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"Exec 2\"}],\"executionContexts\":[{\"compatibleRuntimes\":[\"runtime::H2Runtime\",\"runtime::SnowflakeRuntime\"],\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"H2\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"H2\"}],\"defaultRuntime\":\"runtime::H2Runtime\",\"mapping\":\"mapping::CovidDataMapping\",\"mappingModelCoverageAnalysisResult\":{\"mappedEntities\":[{\"path\":\"domain::COVIDData\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"caseType\"},{\"_type\":\"MappedProperty\",\"name\":\"cases\"},{\"_type\":\"MappedProperty\",\"name\":\"date\"},{\"_type\":\"entity\",\"entityPath\":\"domain::Demographics\",\"name\":\"demographics\"},{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"id\"},{\"_type\":\"MappedProperty\",\"name\":\"lastReportedFlag\"}]},{\"path\":\"domain::Demographics\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"state\"}]}]},\"name\":\"dummyContext\",\"runtimeMetadata\":{\"connectionPath\":\"runtime::connection::H2Connection\",\"connectionType\":\"H2\",\"storePath\":\"store::CovidDataStore\"}}],\"model\":{\"_type\":\"data\",\"elements\":[]},\"name\":\"COVIDDataspace\",\"package\":\"domain\",\"path\":\"domain::COVIDDataspace\",\"stereotypes\":[],\"taggedValues\":[],\"title\":\"COVID Sample Data\"}");
}
@Test
public void testAnalyticsForDataSpaceWithAccessEntitlementsToSnowflake() throws Exception
{
- testDataSpaceAnalyticsArtifactGenerationExtension("models/dataspaceAccessAnalytics.pure", "domain::COVIDDataspaceSnowflake", "{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"# Peleus rupit\\n\\n## Sum super gerens paterque\\n\\nLorem markdownum presso, et tamen cogitis, Taenarius lactantia fluxerunt\\nterrita, vota. Tempore flumina ferrumque bella.\\n\\n- Per dixit\\n- Truces tellusque indignata ducem\\n- Cervice venitis cavernis minus\\n\\n## Tum ausus fovebam incursus magis dici extemplo\\n\\nPiscator degenerat desertaque quid scelus tyranni feror ipsa mortis nec silva\\nsparsus neci cum? Est patulas meam decorem, dat demit corpora exuritque Ulixes,\\ngenitore. Captare certa amore pressos, Diamque\\n[traxit](http://istecondar.net/ministropudoris) devorat duritia ecce, capillos\\nfuerint progenitore curva relictas. Iubae pectus et quateret, non vires tibi\\ncacumina figuram Antigonen rursus verti.\\n\\n## Dicta nec Thestiadae tristi exempla sed suoque\\n\\nFlumina quae loricaeque meruique defensae *me terram* tamen attollere totum\\nneque nullos. Quem plus, stratum.\\n\\n## Quaeque si reddite summoque vultu Teleboasque vincere\\n\\nIsmariae me munus umbram. Usum pedem multis quotiensque mirantum Cephenum et\\namori Procne locutum auctor Volturnus pavent virgineas.\\n\\n if (edi + sidebarTooltip < aiffDisk) {\\n drive_key_firewire += bank(searchHardBoot(bus, packet_click));\\n }\\n var adRow = dlc_rootkit(rdramMegabit) - hertzBanner * 2 +\\n memory_adc.horizontal(class_box_rte, disk, lte_grep);\\n if (grayscale) {\\n spool_windows_metal.zif_firewire *= 3;\\n emoticon_mp = user.thunderboltIcqBus.installer_remote(4, searchCable) *\\n kibibyteYoutubeRaster.simm(-3, nosqlCharacter, sip);\\n }\\n var blob = -2;\\n\\n## Est magis interdum in luctus\\n\\nPrimus illa sub bis infregit saepe agrestem Cyllare lumen cultrosque **Cnosia**.\\nSuis est fero durisque satis.\\n\\n- Nos quas est maesta aliquis se unum\\n- Tu ossa Cupido sagitta hanc inflati profuso\\n- Modo est proles pavor\\n- Stillabant pallada invitaque et tantum dictaque in\\n- Generum coegi tum edaci\\n\\nSuo nec cerae me omnem Famemque, passi si auditque ullo, praebita. Gravi annos\\npudore formidabilis erat pectora perpetuo qua oscula cum ad sed Nabataeus\\nRomethiumque deum Erectheus? O Victoria rostro utque terras vitisque classe.\\nTibi [miserrima hirta](http://decentia-qui.net/docta-petentem), eratis saepius\\ntuus.\",\"diagrams\":[],\"elementDocs\":[],\"elements\":[],\"executables\":[{\"description\":\"Some exec description\",\"executable\":\"service::CovidDataMulti\",\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"Exec 1\"},{\"description\":\"Some more exec description\",\"executable\":\"service::CovidDataSingle\",\"info\":{\"_type\":\"service\",\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"H2\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"H2\"}],\"mapping\":\"mapping::CovidDataMapping\",\"pattern\":\"/9566f101-2108-408f-863f-6d7e154dc17b\",\"query\":\"|domain::COVIDData.all()->project(\\n [\\n x: domain::COVIDData[1]|$x.cases\\n ],\\n ['Cases']\\n)\",\"runtime\":\"runtime::H2Runtime\"},\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"Exec 2\"}],\"executionContexts\":[{\"compatibleRuntimes\":[\"runtime::H2Runtime\",\"runtime::SnowflakeRuntime\"],\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"Snowflake\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"Snowflake\"}],\"defaultRuntime\":\"runtime::SnowflakeRuntime\",\"mapping\":\"mapping::CovidDataMapping\",\"mappingModelCoverageAnalysisResult\":{\"mappedEntities\":[{\"path\":\"domain::COVIDData\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"caseType\"},{\"_type\":\"MappedProperty\",\"name\":\"cases\"},{\"_type\":\"MappedProperty\",\"name\":\"date\"},{\"_type\":\"entity\",\"entityPath\":\"domain::Demographics\",\"name\":\"demographics\"},{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"id\"},{\"_type\":\"MappedProperty\",\"name\":\"lastReportedFlag\"}]},{\"path\":\"domain::Demographics\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"state\"}]}]},\"name\":\"dummyContext\"}],\"model\":{\"_type\":\"data\",\"elements\":[]},\"name\":\"COVIDDataspaceSnowflake\",\"package\":\"domain\",\"path\":\"domain::COVIDDataspaceSnowflake\",\"stereotypes\":[],\"taggedValues\":[],\"title\":\"COVID Sample Data\"}");
+ testDataSpaceAnalyticsArtifactGenerationExtension("models/dataspaceAccessAnalytics.pure", "domain::COVIDDataspaceSnowflake", "{\"defaultExecutionContext\":\"dummyContext\",\"description\":\"# Peleus rupit\\n\\n## Sum super gerens paterque\\n\\nLorem markdownum presso, et tamen cogitis, Taenarius lactantia fluxerunt\\nterrita, vota. Tempore flumina ferrumque bella.\\n\\n- Per dixit\\n- Truces tellusque indignata ducem\\n- Cervice venitis cavernis minus\\n\\n## Tum ausus fovebam incursus magis dici extemplo\\n\\nPiscator degenerat desertaque quid scelus tyranni feror ipsa mortis nec silva\\nsparsus neci cum? Est patulas meam decorem, dat demit corpora exuritque Ulixes,\\ngenitore. Captare certa amore pressos, Diamque\\n[traxit](http://istecondar.net/ministropudoris) devorat duritia ecce, capillos\\nfuerint progenitore curva relictas. Iubae pectus et quateret, non vires tibi\\ncacumina figuram Antigonen rursus verti.\\n\\n## Dicta nec Thestiadae tristi exempla sed suoque\\n\\nFlumina quae loricaeque meruique defensae *me terram* tamen attollere totum\\nneque nullos. Quem plus, stratum.\\n\\n## Quaeque si reddite summoque vultu Teleboasque vincere\\n\\nIsmariae me munus umbram. Usum pedem multis quotiensque mirantum Cephenum et\\namori Procne locutum auctor Volturnus pavent virgineas.\\n\\n if (edi + sidebarTooltip < aiffDisk) {\\n drive_key_firewire += bank(searchHardBoot(bus, packet_click));\\n }\\n var adRow = dlc_rootkit(rdramMegabit) - hertzBanner * 2 +\\n memory_adc.horizontal(class_box_rte, disk, lte_grep);\\n if (grayscale) {\\n spool_windows_metal.zif_firewire *= 3;\\n emoticon_mp = user.thunderboltIcqBus.installer_remote(4, searchCable) *\\n kibibyteYoutubeRaster.simm(-3, nosqlCharacter, sip);\\n }\\n var blob = -2;\\n\\n## Est magis interdum in luctus\\n\\nPrimus illa sub bis infregit saepe agrestem Cyllare lumen cultrosque **Cnosia**.\\nSuis est fero durisque satis.\\n\\n- Nos quas est maesta aliquis se unum\\n- Tu ossa Cupido sagitta hanc inflati profuso\\n- Modo est proles pavor\\n- Stillabant pallada invitaque et tantum dictaque in\\n- Generum coegi tum edaci\\n\\nSuo nec cerae me omnem Famemque, passi si auditque ullo, praebita. Gravi annos\\npudore formidabilis erat pectora perpetuo qua oscula cum ad sed Nabataeus\\nRomethiumque deum Erectheus? O Victoria rostro utque terras vitisque classe.\\nTibi [miserrima hirta](http://decentia-qui.net/docta-petentem), eratis saepius\\ntuus.\",\"diagrams\":[],\"elementDocs\":[],\"elements\":[],\"executables\":[{\"description\":\"Some exec description\",\"executable\":\"service::CovidDataMulti\",\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"Exec 1\"},{\"description\":\"Some more exec description\",\"executable\":\"service::CovidDataSingle\",\"info\":{\"_type\":\"service\",\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"H2\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"H2\"}],\"mapping\":\"mapping::CovidDataMapping\",\"pattern\":\"/9566f101-2108-408f-863f-6d7e154dc17b\",\"query\":\"|domain::COVIDData.all()->project(\\n [\\n x: domain::COVIDData[1]|$x.cases\\n ],\\n ['Cases']\\n)\",\"runtime\":\"runtime::H2Runtime\"},\"result\":{\"_type\":\"tds\",\"columns\":[{\"name\":\"Cases\",\"relationalType\":\"INTEGER\",\"type\":\"Float\"}]},\"title\":\"Exec 2\"}],\"executionContexts\":[{\"compatibleRuntimes\":[\"runtime::H2Runtime\",\"runtime::SnowflakeRuntime\"],\"datasets\":[{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.DEMOGRAPHICS\",\"schema\":\"default\",\"table\":\"DEMOGRAPHICS\",\"type\":\"Snowflake\"},{\"_type\":\"relationalDatabaseTable\",\"database\":\"CovidDataStore\",\"name\":\"default.COVID_DATA\",\"schema\":\"default\",\"table\":\"COVID_DATA\",\"type\":\"Snowflake\"}],\"defaultRuntime\":\"runtime::SnowflakeRuntime\",\"mapping\":\"mapping::CovidDataMapping\",\"mappingModelCoverageAnalysisResult\":{\"mappedEntities\":[{\"path\":\"domain::COVIDData\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"caseType\"},{\"_type\":\"MappedProperty\",\"name\":\"cases\"},{\"_type\":\"MappedProperty\",\"name\":\"date\"},{\"_type\":\"entity\",\"entityPath\":\"domain::Demographics\",\"name\":\"demographics\"},{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"id\"},{\"_type\":\"MappedProperty\",\"name\":\"lastReportedFlag\"}]},{\"path\":\"domain::Demographics\",\"properties\":[{\"_type\":\"MappedProperty\",\"name\":\"fips\"},{\"_type\":\"MappedProperty\",\"name\":\"state\"}]}]},\"name\":\"dummyContext\",\"runtimeMetadata\":{\"connectionPath\":\"runtime::connection::SnowflakeConnection\",\"connectionType\":\"Snowflake\",\"storePath\":\"store::CovidDataStore\"}}],\"model\":{\"_type\":\"data\",\"elements\":[]},\"name\":\"COVIDDataspaceSnowflake\",\"package\":\"domain\",\"path\":\"domain::COVIDDataspaceSnowflake\",\"stereotypes\":[],\"taggedValues\":[],\"title\":\"COVID Sample Data\"}");
}
}