From 56e4ee52f4a10c611f2e268aef06da23cdd3cf08 Mon Sep 17 00:00:00 2001 From: Yannan <73408381+YannanGao-gs@users.noreply.github.com> Date: Fri, 20 Sep 2024 16:49:59 -0400 Subject: [PATCH] add get project entities by classifier API (#476) --- .../api/entities/EntitiesService.java | 9 + .../EntitiesDependenciesResource.java | 22 + .../resources/entities/EntitiesResource.java | 18 +- .../entities/EntitiesServiceImpl.java | 32 +- .../entities/TestEntitiesService.java | 30 +- .../resources/data/PROD-B/entities-1.0.1.json | 38 + .../resources/data/PROD-C/entities-2.0.2.json | 2505 +++++++++++++++++ 7 files changed, 2649 insertions(+), 5 deletions(-) create mode 100644 legend-depot-entities-services/src/test/resources/data/PROD-B/entities-1.0.1.json create mode 100644 legend-depot-entities-services/src/test/resources/data/PROD-C/entities-2.0.2.json diff --git a/legend-depot-entities-api/src/main/java/org/finos/legend/depot/services/api/entities/EntitiesService.java b/legend-depot-entities-api/src/main/java/org/finos/legend/depot/services/api/entities/EntitiesService.java index 4d8afae42..da306495d 100644 --- a/legend-depot-entities-api/src/main/java/org/finos/legend/depot/services/api/entities/EntitiesService.java +++ b/legend-depot-entities-api/src/main/java/org/finos/legend/depot/services/api/entities/EntitiesService.java @@ -31,6 +31,8 @@ public interface EntitiesService List getEntities(String groupId, String artifactId, String versionId); + List getEntitiesByClassifier(String groupId, String artifactId, String versionId, String classifier); + Optional getEntity(String groupId, String artifactId, String versionId, String entityPath); List getEntityFromDependencies(String groupId, String artifactId, String versionId, List entityPaths, boolean includeOrigin); @@ -39,8 +41,15 @@ public interface EntitiesService List getDependenciesEntities(List projectDependencies, boolean transitive, boolean includeOrigin); + List getDependenciesEntitiesByClassifier(List projectDependencies, String classifier, boolean transitive, boolean includeOrigin); + default List getDependenciesEntities(String groupId, String artifactId, String versionId, boolean transitive, boolean includeOrigin) { return getDependenciesEntities(Arrays.asList(new ProjectVersion(groupId, artifactId, versionId)), transitive, includeOrigin); } + + default List getDependenciesEntitiesByClassifier(String groupId, String artifactId, String versionId, String classifier, boolean transitive, boolean includeOrigin) + { + return getDependenciesEntitiesByClassifier(Arrays.asList(new ProjectVersion(groupId, artifactId, versionId)), classifier, transitive, includeOrigin); + } } diff --git a/legend-depot-entities-services/src/main/java/org/finos/legend/depot/server/resources/entities/EntitiesDependenciesResource.java b/legend-depot-entities-services/src/main/java/org/finos/legend/depot/server/resources/entities/EntitiesDependenciesResource.java index 41fd487f5..a99483d7d 100644 --- a/legend-depot-entities-services/src/main/java/org/finos/legend/depot/server/resources/entities/EntitiesDependenciesResource.java +++ b/legend-depot-entities-services/src/main/java/org/finos/legend/depot/server/resources/entities/EntitiesDependenciesResource.java @@ -73,6 +73,28 @@ public Response getEntitiesFromDependencies(@PathParam("groupId") String groupId return handle(GET_VERSION_DEPENDENCY_ENTITIES, () -> this.entitiesService.getDependenciesEntities(groupId, artifactId, versionId, transitive, includeOrigin), request, () -> EtagBuilder.create().withGAV(groupId, artifactId, versionId).build()); } + @GET + @Path("/projects/{groupId}/{artifactId}/versions/{versionId}/classifier/{classifier}/dependencies") + @ApiOperation(value = GET_VERSION_DEPENDENCY_ENTITIES, hidden = true) + @Consumes(MediaType.APPLICATION_JSON) + @Produces(MediaType.APPLICATION_JSON) + public Response getEntitiesFromDependenciesByClassifier(@PathParam("groupId") String groupId, + @PathParam("artifactId") String artifactId, + @PathParam("versionId") @ApiParam(value = VersionValidator.VALID_VERSION_ID_TXT) String versionId, + @PathParam("classifier") String classifier, + @QueryParam("transitive") @DefaultValue("false") + @ApiParam("Whether to return transitive dependencies") boolean transitive, + @QueryParam("includeOrigin") @DefaultValue("false") + @ApiParam("Whether to return start of dependency tree") boolean includeOrigin, + @Context Request request) + { + if (classifier == null) + { + Response.status(Response.Status.BAD_REQUEST).entity("Classifier is not valid").build(); + } + return handle(GET_VERSION_DEPENDENCY_ENTITIES, () -> this.entitiesService.getDependenciesEntitiesByClassifier(groupId, artifactId, versionId, classifier, transitive, includeOrigin), request, () -> EtagBuilder.create().withGAV(groupId, artifactId, versionId).build()); + } + @POST @Path("/projects/{groupId}/{artifactId}/versions/{versionId}/dependencies/paths") @ApiOperation(value = GET_VERSION_ENTITY_FROM_DEPENDENCIES, hidden = true) diff --git a/legend-depot-entities-services/src/main/java/org/finos/legend/depot/server/resources/entities/EntitiesResource.java b/legend-depot-entities-services/src/main/java/org/finos/legend/depot/server/resources/entities/EntitiesResource.java index 4a4d4b291..c715c6e33 100644 --- a/legend-depot-entities-services/src/main/java/org/finos/legend/depot/server/resources/entities/EntitiesResource.java +++ b/legend-depot-entities-services/src/main/java/org/finos/legend/depot/server/resources/entities/EntitiesResource.java @@ -64,7 +64,23 @@ public Response getEntities(@PathParam("groupId") String groupId, return handle(GET_VERSION_ENTITIES, () -> this.entitiesService.getEntities(groupId, artifactId, versionId), request, () -> EtagBuilder.create().withGAV(groupId, artifactId, versionId).build()); } - + @GET + @Path("/projects/{groupId}/{artifactId}/versions/{versionId}/classifier/{classifier}") + @ApiOperation(value = GET_VERSION_ENTITIES, hidden = true) + @Produces(MediaType.APPLICATION_JSON) + public Response getEntitiesByClassifier(@PathParam("groupId") String groupId, + @PathParam("artifactId") String artifactId, + @PathParam("versionId") @ApiParam(value = VersionValidator.VALID_VERSION_ID_TXT) String versionId, + @PathParam("classifier") String classifier, + @Context Request request) + { + if (classifier == null) + { + Response.status(Response.Status.BAD_REQUEST).entity("Classifier is not valid").build(); + } + return handle(GET_VERSION_ENTITIES, () -> this.entitiesService.getEntitiesByClassifier(groupId, artifactId, versionId, classifier), request, () -> EtagBuilder.create().withGAV(groupId, artifactId, versionId).build()); + } + @GET @Path("/projects/{groupId}/{artifactId}/versions/{versionId}/entities/{path}") @ApiOperation(GET_VERSION_ENTITY) diff --git a/legend-depot-entities-services/src/main/java/org/finos/legend/depot/services/entities/EntitiesServiceImpl.java b/legend-depot-entities-services/src/main/java/org/finos/legend/depot/services/entities/EntitiesServiceImpl.java index 177e50774..ca8ad7760 100644 --- a/legend-depot-entities-services/src/main/java/org/finos/legend/depot/services/entities/EntitiesServiceImpl.java +++ b/legend-depot-entities-services/src/main/java/org/finos/legend/depot/services/entities/EntitiesServiceImpl.java @@ -61,6 +61,13 @@ public List getEntities(String groupId, String artifactId, String versio return entities.getAllEntities(groupId, artifactId, version); } + @Override + public List getEntitiesByClassifier(String groupId, String artifactId, String versionId, String classifier) + { + String version = this.projects.resolveAliasesAndCheckVersionExists(groupId, artifactId, versionId); + return entities.findEntitiesByClassifier(groupId, artifactId, version, classifier); + } + @Override public Optional getEntity(String groupId, String artifactId, String versionId, String entityPath) { @@ -87,8 +94,7 @@ public List getEntitiesByPackage(String groupId, String artifactId, Stri return entities.getEntitiesByPackage(groupId, artifactId, version, packageName, classifierPaths, includeSubPackages); } - @Override - public List getDependenciesEntities(List projectDependencies, boolean transitive, boolean includeOrigin) + public List getDependenciesEntities(List projectDependencies, String classifier, boolean transitive, boolean includeOrigin) { Set dependencies = (Set) executeWithTrace(CALCULATE_PROJECT_DEPENDENCIES, () -> { @@ -110,7 +116,15 @@ public List getDependenciesEntities(List ParallelIterate.forEach(dependencies, dep -> { String version = this.projects.resolveAliasesAndCheckVersionExists(dep.getGroupId(), dep.getArtifactId(), dep.getVersionId()); - List deps = (List) entities.getAllEntities(dep.getGroupId(), dep.getArtifactId(), version).stream().collect(Collectors.toList()); + List deps; + if (classifier != null) + { + deps = (List) entities.findEntitiesByClassifier(dep.getGroupId(), dep.getArtifactId(), version, classifier).stream().collect(Collectors.toList()); + } + else + { + deps = (List) entities.getAllEntities(dep.getGroupId(), dep.getArtifactId(), version).stream().collect(Collectors.toList()); + } depEntities.add(new ProjectVersionEntities(dep.getGroupId(), dep.getArtifactId(), version, deps)); totalEntities.addAndGet(deps.size()); TracerFactory.get().log(String.format("Total [%s-%s-%s]: [%s] entities",dep.getGroupId(), dep.getArtifactId(), dep.getVersionId(),deps.size())); @@ -120,6 +134,18 @@ public List getDependenciesEntities(List }); } + @Override + public List getDependenciesEntities(List projectDependencies, boolean transitive, boolean includeOrigin) + { + return getDependenciesEntities(projectDependencies, null, transitive, includeOrigin); + } + + @Override + public List getDependenciesEntitiesByClassifier(List projectDependencies, String classifier, boolean transitive, boolean includeOrigin) + { + return getDependenciesEntities(projectDependencies, classifier, transitive, includeOrigin); + } + private Object executeWithTrace(String label, Supplier functionToExecute) { return TracerFactory.get().executeWithTrace(label, () -> functionToExecute.get()); diff --git a/legend-depot-entities-services/src/test/java/org/finos/legend/depot/services/entities/TestEntitiesService.java b/legend-depot-entities-services/src/test/java/org/finos/legend/depot/services/entities/TestEntitiesService.java index de5252717..df25dba28 100644 --- a/legend-depot-entities-services/src/test/java/org/finos/legend/depot/services/entities/TestEntitiesService.java +++ b/legend-depot-entities-services/src/test/java/org/finos/legend/depot/services/entities/TestEntitiesService.java @@ -47,7 +47,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Optional; import java.util.function.Predicate; import static org.finos.legend.depot.domain.version.VersionValidator.BRANCH_SNAPSHOT; @@ -244,6 +243,35 @@ public void canGetClassifiers() Assert.assertEquals(entities.size(), 3); } + @Test + public void canGetEntitiesForProjectAndVersionByClassifier() + { + projectsVersionsStore.createOrUpdate(new StoreProjectVersionData("example.services.test","test","2.0.2")); + entityUtils.loadEntities("PROD-C", "2.0.2"); + List entity = entitiesService.getEntitiesByClassifier("example.services.test", "test", "2.0.2", "meta::pure::metamodel::function::ConcreteFunctionDefinition"); + Assert.assertNotNull(entity); + Assert.assertEquals(1, entity.size()); + } + + @Test + public void canGetDependencyEntitiesForProjectAndVersionByClassifier() + { + StoreProjectVersionData project = new StoreProjectVersionData("examples.metadata", "test-dependencies", "1.0.1"); + ProjectVersion pv = new ProjectVersion("example.services.test", "test", "2.0.2"); + project.getVersionData().addDependency(pv); + projectsVersionsStore.createOrUpdate(project); + projectsVersionsStore.createOrUpdate(new StoreProjectVersionData("example.services.test","test","2.0.2")); + entityUtils.loadEntities("PROD-B", "1.0.1"); + entityUtils.loadEntities("PROD-C", "2.0.2"); + List entity = entitiesService.getDependenciesEntitiesByClassifier("examples.metadata", "test-dependencies", "1.0.1", "meta::pure::metamodel::function::ConcreteFunctionDefinition", true, true); + Assert.assertNotNull(entity); + Assert.assertEquals(2, entity.size()); + + List entity1 = entitiesService.getDependenciesEntitiesByClassifier("examples.metadata", "test-dependencies", "1.0.1", "meta::pure::metamodel::function::ConcreteFunctionDefinition", true, false); + Assert.assertNotNull(entity1); + Assert.assertEquals(1, entity1.size()); + } + @Test public void canGetEntityFromDependencies() { diff --git a/legend-depot-entities-services/src/test/resources/data/PROD-B/entities-1.0.1.json b/legend-depot-entities-services/src/test/resources/data/PROD-B/entities-1.0.1.json new file mode 100644 index 000000000..519eb3cd3 --- /dev/null +++ b/legend-depot-entities-services/src/test/resources/data/PROD-B/entities-1.0.1.json @@ -0,0 +1,38 @@ +[ + { + "_type": "entityData", + "versionId": "1.0.1", + "groupId": "examples.metadata", + "artifactId": "test-dependencies", + "versionedEntity": false, + "entityAttributes": { + "path": "test::testFunction__String_1_", + "classifierPath": "meta::pure::metamodel::function::ConcreteFunctionDefinition", + "package": "test" + }, + "entity": { + "classifierPath": "meta::pure::metamodel::function::ConcreteFunctionDefinition", + "path": "test::testFunction__String_1_", + "content": { + "_type": "function", + "body": [ + { + "_type": "string", + "value": "" + } + ], + "name": "testFunction__String_1_", + "package": "test", + "parameters": [], + "postConstraints": [], + "preConstraints": [], + "returnMultiplicity": { + "lowerBound": 1, + "upperBound": 1 + }, + "returnType": "String" + } + }, + "id": "" + } +] \ No newline at end of file diff --git a/legend-depot-entities-services/src/test/resources/data/PROD-C/entities-2.0.2.json b/legend-depot-entities-services/src/test/resources/data/PROD-C/entities-2.0.2.json new file mode 100644 index 000000000..8cc45a2ce --- /dev/null +++ b/legend-depot-entities-services/src/test/resources/data/PROD-C/entities-2.0.2.json @@ -0,0 +1,2505 @@ +[ + { + "_type": "entityData", + "versionId": "2.0.2", + "groupId": "example.services.test", + "artifactId": "test", + "versionedEntity": false, + "entityAttributes": { + "path": "domain::covid::JHUCovid19", + "classifierPath": "meta::pure::metamodel::type::Class", + "package": "domain::covid" + }, + "entity": { + "path": "domain::covid::JHUCovid19", + "classifierPath": "meta::pure::metamodel::type::Class", + "content": { + "_type": "class", + "name": "JHUCovid19", + "package": "domain::covid", + "properties": [ + { + "multiplicity": { + "lowerBound": 0, + "upperBound": 1 + }, + "name": "countryRegion", + "type": "String" + }, + { + "multiplicity": { + "lowerBound": 0, + "upperBound": 1 + }, + "name": "provinceState", + "type": "String" + }, + { + "multiplicity": { + "lowerBound": 0, + "upperBound": 1 + }, + "name": "county", + "type": "String" + }, + { + "multiplicity": { + "lowerBound": 0, + "upperBound": 1 + }, + "name": "fips", + "type": "String" + }, + { + "multiplicity": { + "lowerBound": 0, + "upperBound": 1 + }, + "name": "date", + "type": "Date" + }, + { + "multiplicity": { + "lowerBound": 0, + "upperBound": 1 + }, + "name": "caseType", + "type": "String" + }, + { + "multiplicity": { + "lowerBound": 0, + "upperBound": 1 + }, + "name": "cases", + "type": "Float" + }, + { + "multiplicity": { + "lowerBound": 0, + "upperBound": 1 + }, + "name": "long", + "type": "Float" + }, + { + "multiplicity": { + "lowerBound": 0, + "upperBound": 1 + }, + "name": "lat", + "type": "Float" + }, + { + "multiplicity": { + "lowerBound": 0, + "upperBound": 1 + }, + "name": "iso3166_1", + "type": "String" + }, + { + "multiplicity": { + "lowerBound": 0, + "upperBound": 1 + }, + "name": "iso3166_2", + "type": "String" + }, + { + "multiplicity": { + "lowerBound": 0, + "upperBound": 1 + }, + "name": "difference", + "type": "Float" + }, + { + "multiplicity": { + "lowerBound": 0, + "upperBound": 1 + }, + "name": "lastUpdatedDate", + "type": "DateTime" + }, + { + "multiplicity": { + "lowerBound": 0, + "upperBound": 1 + }, + "name": "lastReportedFlag", + "type": "Boolean" + }, + { + "multiplicity": { + "lowerBound": 0, + "upperBound": 1 + }, + "name": "demographics", + "type": "domain::covid::Demographics" + } + ] + } + }, + "id": "" + }, + { + "_type": "entityData", + "versionId": "2.0.2", + "groupId": "example.services.test", + "artifactId": "test", + "versionedEntity": false, + "entityAttributes": { + "path": "domain::covid::Demographics", + "classifierPath": "meta::pure::metamodel::type::Class", + "package": "domain::covid" + }, + "entity": { + "path": "domain::covid::Demographics", + "classifierPath": "meta::pure::metamodel::type::Class", + "content": { + "_type": "class", + "name": "Demographics", + "package": "domain::covid", + "properties": [ + { + "multiplicity": { + "lowerBound": 0, + "upperBound": 1 + }, + "name": "iso3166_1", + "type": "String" + }, + { + "multiplicity": { + "lowerBound": 0, + "upperBound": 1 + }, + "name": "iso3166_2", + "type": "String" + }, + { + "multiplicity": { + "lowerBound": 0, + "upperBound": 1 + }, + "name": "fips", + "type": "String" + }, + { + "multiplicity": { + "lowerBound": 0, + "upperBound": 1 + }, + "name": "latitude", + "type": "Float" + }, + { + "multiplicity": { + "lowerBound": 0, + "upperBound": 1 + }, + "name": "longitude", + "type": "Float" + }, + { + "multiplicity": { + "lowerBound": 0, + "upperBound": 1 + }, + "name": "state", + "type": "String" + }, + { + "multiplicity": { + "lowerBound": 0, + "upperBound": 1 + }, + "name": "county", + "type": "String" + }, + { + "multiplicity": { + "lowerBound": 0, + "upperBound": 1 + }, + "name": "totalPopulation", + "type": "Float" + }, + { + "multiplicity": { + "lowerBound": 0, + "upperBound": 1 + }, + "name": "totalMalePopulation", + "type": "Float" + }, + { + "multiplicity": { + "lowerBound": 0, + "upperBound": 1 + }, + "name": "totalFemalePopulation", + "type": "Float" + } + ] + } + }, + "id": "" + }, + { + "_type": "entityData", + "versionId": "2.0.2", + "groupId": "example.services.test", + "artifactId": "test", + "versionedEntity": false, + "entityAttributes": { + "path": "mapping::CovidDataMapping", + "classifierPath": "meta::pure::mapping::Mapping", + "package": "mapping" + }, + "entity": { + "path": "mapping::CovidDataMapping", + "classifierPath": "meta::pure::mapping::Mapping", + "content": { + "_type": "mapping", + "classMappings": [ + { + "_type": "relational", + "class": "domain::covid::Demographics", + "distinct": false, + "mainTable": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_DEMOGRAPHICS_Public" + }, + "primaryKey": [ + { + "_type": "column", + "column": "ISO3166_1", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_DEMOGRAPHICS_Public" + }, + "tableAlias": "UV_DEMOGRAPHICS_Public" + }, + { + "_type": "column", + "column": "ISO3166_2", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_DEMOGRAPHICS_Public" + }, + "tableAlias": "UV_DEMOGRAPHICS_Public" + }, + { + "_type": "column", + "column": "FIPS", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_DEMOGRAPHICS_Public" + }, + "tableAlias": "UV_DEMOGRAPHICS_Public" + }, + { + "_type": "column", + "column": "LATITUDE", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_DEMOGRAPHICS_Public" + }, + "tableAlias": "UV_DEMOGRAPHICS_Public" + }, + { + "_type": "column", + "column": "LONGITUDE", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_DEMOGRAPHICS_Public" + }, + "tableAlias": "UV_DEMOGRAPHICS_Public" + }, + { + "_type": "column", + "column": "STATE", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_DEMOGRAPHICS_Public" + }, + "tableAlias": "UV_DEMOGRAPHICS_Public" + }, + { + "_type": "column", + "column": "COUNTY", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_DEMOGRAPHICS_Public" + }, + "tableAlias": "UV_DEMOGRAPHICS_Public" + }, + { + "_type": "column", + "column": "TOTAL_POPULATION", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_DEMOGRAPHICS_Public" + }, + "tableAlias": "UV_DEMOGRAPHICS_Public" + }, + { + "_type": "column", + "column": "TOTAL_MALE_POPULATION", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_DEMOGRAPHICS_Public" + }, + "tableAlias": "UV_DEMOGRAPHICS_Public" + }, + { + "_type": "column", + "column": "TOTAL_FEMALE_POPULATION", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_DEMOGRAPHICS_Public" + }, + "tableAlias": "UV_DEMOGRAPHICS_Public" + } + ], + "propertyMappings": [ + { + "_type": "relationalPropertyMapping", + "property": { + "class": "domain::covid::Demographics", + "property": "iso3166_1" + }, + "relationalOperation": { + "_type": "column", + "column": "ISO3166_1", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_DEMOGRAPHICS_Public" + }, + "tableAlias": "UV_DEMOGRAPHICS_Public" + }, + "source": "domain_covid_Demographics" + }, + { + "_type": "relationalPropertyMapping", + "property": { + "class": "domain::covid::Demographics", + "property": "iso3166_2" + }, + "relationalOperation": { + "_type": "column", + "column": "ISO3166_2", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_DEMOGRAPHICS_Public" + }, + "tableAlias": "UV_DEMOGRAPHICS_Public" + }, + "source": "domain_covid_Demographics" + }, + { + "_type": "relationalPropertyMapping", + "property": { + "class": "domain::covid::Demographics", + "property": "fips" + }, + "relationalOperation": { + "_type": "column", + "column": "FIPS", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_DEMOGRAPHICS_Public" + }, + "tableAlias": "UV_DEMOGRAPHICS_Public" + }, + "source": "domain_covid_Demographics" + }, + { + "_type": "relationalPropertyMapping", + "property": { + "class": "domain::covid::Demographics", + "property": "latitude" + }, + "relationalOperation": { + "_type": "column", + "column": "LATITUDE", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_DEMOGRAPHICS_Public" + }, + "tableAlias": "UV_DEMOGRAPHICS_Public" + }, + "source": "domain_covid_Demographics" + }, + { + "_type": "relationalPropertyMapping", + "property": { + "class": "domain::covid::Demographics", + "property": "longitude" + }, + "relationalOperation": { + "_type": "column", + "column": "LONGITUDE", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_DEMOGRAPHICS_Public" + }, + "tableAlias": "UV_DEMOGRAPHICS_Public" + }, + "source": "domain_covid_Demographics" + }, + { + "_type": "relationalPropertyMapping", + "property": { + "class": "domain::covid::Demographics", + "property": "state" + }, + "relationalOperation": { + "_type": "column", + "column": "STATE", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_DEMOGRAPHICS_Public" + }, + "tableAlias": "UV_DEMOGRAPHICS_Public" + }, + "source": "domain_covid_Demographics" + }, + { + "_type": "relationalPropertyMapping", + "property": { + "class": "domain::covid::Demographics", + "property": "county" + }, + "relationalOperation": { + "_type": "column", + "column": "COUNTY", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_DEMOGRAPHICS_Public" + }, + "tableAlias": "UV_DEMOGRAPHICS_Public" + }, + "source": "domain_covid_Demographics" + }, + { + "_type": "relationalPropertyMapping", + "property": { + "class": "domain::covid::Demographics", + "property": "totalPopulation" + }, + "relationalOperation": { + "_type": "column", + "column": "TOTAL_POPULATION", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_DEMOGRAPHICS_Public" + }, + "tableAlias": "UV_DEMOGRAPHICS_Public" + }, + "source": "domain_covid_Demographics" + }, + { + "_type": "relationalPropertyMapping", + "property": { + "class": "domain::covid::Demographics", + "property": "totalMalePopulation" + }, + "relationalOperation": { + "_type": "column", + "column": "TOTAL_MALE_POPULATION", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_DEMOGRAPHICS_Public" + }, + "tableAlias": "UV_DEMOGRAPHICS_Public" + }, + "source": "domain_covid_Demographics" + }, + { + "_type": "relationalPropertyMapping", + "property": { + "class": "domain::covid::Demographics", + "property": "totalFemalePopulation" + }, + "relationalOperation": { + "_type": "column", + "column": "TOTAL_FEMALE_POPULATION", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_DEMOGRAPHICS_Public" + }, + "tableAlias": "UV_DEMOGRAPHICS_Public" + }, + "source": "domain_covid_Demographics" + } + ], + "root": false + }, + { + "_type": "relational", + "class": "domain::covid::JHUCovid19", + "distinct": false, + "mainTable": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_JHU_COVID_19_Public" + }, + "primaryKey": [ + { + "_type": "column", + "column": "COUNTRY_REGION", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_JHU_COVID_19_Public" + }, + "tableAlias": "UV_JHU_COVID_19_Public" + }, + { + "_type": "column", + "column": "PROVINCE_STATE", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_JHU_COVID_19_Public" + }, + "tableAlias": "UV_JHU_COVID_19_Public" + }, + { + "_type": "column", + "column": "COUNTY", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_JHU_COVID_19_Public" + }, + "tableAlias": "UV_JHU_COVID_19_Public" + }, + { + "_type": "column", + "column": "FIPS", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_JHU_COVID_19_Public" + }, + "tableAlias": "UV_JHU_COVID_19_Public" + }, + { + "_type": "column", + "column": "CASE_TYPE", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_JHU_COVID_19_Public" + }, + "tableAlias": "UV_JHU_COVID_19_Public" + }, + { + "_type": "column", + "column": "CASES", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_JHU_COVID_19_Public" + }, + "tableAlias": "UV_JHU_COVID_19_Public" + }, + { + "_type": "column", + "column": "LONG", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_JHU_COVID_19_Public" + }, + "tableAlias": "UV_JHU_COVID_19_Public" + }, + { + "_type": "column", + "column": "LAT", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_JHU_COVID_19_Public" + }, + "tableAlias": "UV_JHU_COVID_19_Public" + }, + { + "_type": "column", + "column": "ISO3166_1", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_JHU_COVID_19_Public" + }, + "tableAlias": "UV_JHU_COVID_19_Public" + }, + { + "_type": "column", + "column": "ISO3166_2", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_JHU_COVID_19_Public" + }, + "tableAlias": "UV_JHU_COVID_19_Public" + }, + { + "_type": "column", + "column": "DIFFERENCE", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_JHU_COVID_19_Public" + }, + "tableAlias": "UV_JHU_COVID_19_Public" + }, + { + "_type": "column", + "column": "LAST_UPDATED_DATE", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_JHU_COVID_19_Public" + }, + "tableAlias": "UV_JHU_COVID_19_Public" + }, + { + "_type": "column", + "column": "LAST_REPORTED_FLAG", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_JHU_COVID_19_Public" + }, + "tableAlias": "UV_JHU_COVID_19_Public" + } + ], + "propertyMappings": [ + { + "_type": "relationalPropertyMapping", + "property": { + "class": "domain::covid::JHUCovid19", + "property": "countryRegion" + }, + "relationalOperation": { + "_type": "column", + "column": "COUNTRY_REGION", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_JHU_COVID_19_Public" + }, + "tableAlias": "UV_JHU_COVID_19_Public" + }, + "source": "domain_covid_JHUCovid19" + }, + { + "_type": "relationalPropertyMapping", + "property": { + "class": "domain::covid::JHUCovid19", + "property": "provinceState" + }, + "relationalOperation": { + "_type": "column", + "column": "PROVINCE_STATE", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_JHU_COVID_19_Public" + }, + "tableAlias": "UV_JHU_COVID_19_Public" + }, + "source": "domain_covid_JHUCovid19" + }, + { + "_type": "relationalPropertyMapping", + "property": { + "class": "domain::covid::JHUCovid19", + "property": "county" + }, + "relationalOperation": { + "_type": "column", + "column": "COUNTY", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_JHU_COVID_19_Public" + }, + "tableAlias": "UV_JHU_COVID_19_Public" + }, + "source": "domain_covid_JHUCovid19" + }, + { + "_type": "relationalPropertyMapping", + "property": { + "class": "domain::covid::JHUCovid19", + "property": "fips" + }, + "relationalOperation": { + "_type": "column", + "column": "FIPS", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_JHU_COVID_19_Public" + }, + "tableAlias": "UV_JHU_COVID_19_Public" + }, + "source": "domain_covid_JHUCovid19" + }, + { + "_type": "relationalPropertyMapping", + "property": { + "class": "domain::covid::JHUCovid19", + "property": "date" + }, + "relationalOperation": { + "_type": "column", + "column": "DATE", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_JHU_COVID_19_Public" + }, + "tableAlias": "UV_JHU_COVID_19_Public" + }, + "source": "domain_covid_JHUCovid19" + }, + { + "_type": "relationalPropertyMapping", + "property": { + "class": "domain::covid::JHUCovid19", + "property": "caseType" + }, + "relationalOperation": { + "_type": "column", + "column": "CASE_TYPE", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_JHU_COVID_19_Public" + }, + "tableAlias": "UV_JHU_COVID_19_Public" + }, + "source": "domain_covid_JHUCovid19" + }, + { + "_type": "relationalPropertyMapping", + "property": { + "class": "domain::covid::JHUCovid19", + "property": "cases" + }, + "relationalOperation": { + "_type": "column", + "column": "CASES", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_JHU_COVID_19_Public" + }, + "tableAlias": "UV_JHU_COVID_19_Public" + }, + "source": "domain_covid_JHUCovid19" + }, + { + "_type": "relationalPropertyMapping", + "property": { + "class": "domain::covid::JHUCovid19", + "property": "long" + }, + "relationalOperation": { + "_type": "column", + "column": "LONG", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_JHU_COVID_19_Public" + }, + "tableAlias": "UV_JHU_COVID_19_Public" + }, + "source": "domain_covid_JHUCovid19" + }, + { + "_type": "relationalPropertyMapping", + "property": { + "class": "domain::covid::JHUCovid19", + "property": "lat" + }, + "relationalOperation": { + "_type": "column", + "column": "LAT", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_JHU_COVID_19_Public" + }, + "tableAlias": "UV_JHU_COVID_19_Public" + }, + "source": "domain_covid_JHUCovid19" + }, + { + "_type": "relationalPropertyMapping", + "property": { + "class": "domain::covid::JHUCovid19", + "property": "iso3166_1" + }, + "relationalOperation": { + "_type": "column", + "column": "ISO3166_1", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_JHU_COVID_19_Public" + }, + "tableAlias": "UV_JHU_COVID_19_Public" + }, + "source": "domain_covid_JHUCovid19" + }, + { + "_type": "relationalPropertyMapping", + "property": { + "class": "domain::covid::JHUCovid19", + "property": "iso3166_2" + }, + "relationalOperation": { + "_type": "column", + "column": "ISO3166_2", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_JHU_COVID_19_Public" + }, + "tableAlias": "UV_JHU_COVID_19_Public" + }, + "source": "domain_covid_JHUCovid19" + }, + { + "_type": "relationalPropertyMapping", + "property": { + "class": "domain::covid::JHUCovid19", + "property": "difference" + }, + "relationalOperation": { + "_type": "column", + "column": "DIFFERENCE", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_JHU_COVID_19_Public" + }, + "tableAlias": "UV_JHU_COVID_19_Public" + }, + "source": "domain_covid_JHUCovid19" + }, + { + "_type": "relationalPropertyMapping", + "property": { + "class": "domain::covid::JHUCovid19", + "property": "lastUpdatedDate" + }, + "relationalOperation": { + "_type": "column", + "column": "LAST_UPDATED_DATE", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_JHU_COVID_19_Public" + }, + "tableAlias": "UV_JHU_COVID_19_Public" + }, + "source": "domain_covid_JHUCovid19" + }, + { + "_type": "relationalPropertyMapping", + "property": { + "class": "domain::covid::JHUCovid19", + "property": "lastReportedFlag" + }, + "relationalOperation": { + "_type": "column", + "column": "LAST_REPORTED_FLAG", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_JHU_COVID_19_Public" + }, + "tableAlias": "UV_JHU_COVID_19_Public" + }, + "source": "domain_covid_JHUCovid19" + }, + { + "_type": "relationalPropertyMapping", + "property": { + "class": "domain::covid::JHUCovid19", + "property": "demographics" + }, + "relationalOperation": { + "_type": "elemtWithJoins", + "joins": [ + { + "db": "store::CovidDataStore", + "name": "JHUCovid19Demographics" + } + ] + }, + "source": "domain_covid_JHUCovid19", + "target": "domain_covid_Demographics" + } + ], + "root": false + } + ], + "enumerationMappings": [], + "includedMappings": [], + "name": "CovidDataMapping", + "package": "mapping", + "tests": [] + } + }, + "id": "" + }, + { + "_type": "entityData", + "versionId": "2.0.2", + "groupId": "example.services.test", + "artifactId": "test", + "versionedEntity": false, + "entityAttributes": { + "path": "presentation::SourceCode", + "classifierPath": "meta::pure::metamodel::text::Text", + "package": "presentation" + }, + "entity": { + "path": "presentation::SourceCode", + "classifierPath": "meta::pure::metamodel::text::Text", + "content": { + "_type": "text", + "content": "###Relational\r\nDatabase store::CovidDataStore\r\n(\r\n Schema USER_VIEW\r\n (\r\n Table UV_DEMOGRAPHICS_Public\r\n (\r\n ISO3166_1 VARCHAR(16777216) PRIMARY KEY,\r\n ISO3166_2 VARCHAR(16777216) PRIMARY KEY,\r\n FIPS VARCHAR(16777216) PRIMARY KEY,\r\n LATITUDE FLOAT PRIMARY KEY,\r\n LONGITUDE FLOAT PRIMARY KEY,\r\n STATE VARCHAR(16777216) PRIMARY KEY,\r\n COUNTY VARCHAR(16777216) PRIMARY KEY,\r\n TOTAL_POPULATION NUMERIC(38, 0) PRIMARY KEY,\r\n TOTAL_MALE_POPULATION NUMERIC(38, 0) PRIMARY KEY,\r\n TOTAL_FEMALE_POPULATION NUMERIC(38, 0) PRIMARY KEY\r\n )\r\n Table UV_JHU_COVID_19_Public\r\n (\r\n COUNTRY_REGION VARCHAR(16777216) PRIMARY KEY,\r\n PROVINCE_STATE VARCHAR(16777216) PRIMARY KEY,\r\n COUNTY VARCHAR(16777216) PRIMARY KEY,\r\n FIPS VARCHAR(16777216) PRIMARY KEY,\r\n DATE DATE,\r\n CASE_TYPE VARCHAR(16777216) PRIMARY KEY,\r\n CASES NUMERIC(38, 0) PRIMARY KEY,\r\n LONG FLOAT PRIMARY KEY,\r\n LAT FLOAT PRIMARY KEY,\r\n ISO3166_1 VARCHAR(16777216) PRIMARY KEY,\r\n ISO3166_2 VARCHAR(16777216) PRIMARY KEY,\r\n DIFFERENCE NUMERIC(38, 0) PRIMARY KEY,\r\n LAST_UPDATED_DATE TIMESTAMP PRIMARY KEY,\r\n LAST_REPORTED_FLAG BIT PRIMARY KEY\r\n )\r\n )\r\n\r\n Join JHUCovid19Demographics(USER_VIEW.UV_DEMOGRAPHICS_Public.FIPS = USER_VIEW.UV_JHU_COVID_19_Public.FIPS)\r\n)\r\n\r\n\r\n###Pure\r\nClass domain::covid::Demographics\r\n{\r\n iso3166_1: String[0..1];\r\n iso3166_2: String[0..1];\r\n fips: String[0..1];\r\n latitude: Float[0..1];\r\n longitude: Float[0..1];\r\n state: String[0..1];\r\n county: String[0..1];\r\n totalPopulation: Float[0..1];\r\n totalMalePopulation: Float[0..1];\r\n totalFemalePopulation: Float[0..1];\r\n}\r\n\r\nClass domain::covid::JHUCovid19\r\n{\r\n countryRegion: String[0..1];\r\n provinceState: String[0..1];\r\n county: String[0..1];\r\n fips: String[0..1];\r\n date: Date[0..1];\r\n caseType: String[0..1];\r\n cases: Float[0..1];\r\n long: Float[0..1];\r\n lat: Float[0..1];\r\n iso3166_1: String[0..1];\r\n iso3166_2: String[0..1];\r\n difference: Float[0..1];\r\n lastUpdatedDate: DateTime[0..1];\r\n lastReportedFlag: Boolean[0..1];\r\n demographics: domain::covid::Demographics[0..1];\r\n}\r\n\r\n\r\n###Mapping\r\nMapping mapping::CovidDataMapping\r\n(\r\n domain::covid::Demographics: Relational\r\n {\r\n ~primaryKey\r\n (\r\n [store::CovidDataStore]USER_VIEW.UV_DEMOGRAPHICS_Public.ISO3166_1,\r\n [store::CovidDataStore]USER_VIEW.UV_DEMOGRAPHICS_Public.ISO3166_2,\r\n [store::CovidDataStore]USER_VIEW.UV_DEMOGRAPHICS_Public.FIPS,\r\n [store::CovidDataStore]USER_VIEW.UV_DEMOGRAPHICS_Public.LATITUDE,\r\n [store::CovidDataStore]USER_VIEW.UV_DEMOGRAPHICS_Public.LONGITUDE,\r\n [store::CovidDataStore]USER_VIEW.UV_DEMOGRAPHICS_Public.STATE,\r\n [store::CovidDataStore]USER_VIEW.UV_DEMOGRAPHICS_Public.COUNTY,\r\n [store::CovidDataStore]USER_VIEW.UV_DEMOGRAPHICS_Public.TOTAL_POPULATION,\r\n [store::CovidDataStore]USER_VIEW.UV_DEMOGRAPHICS_Public.TOTAL_MALE_POPULATION,\r\n [store::CovidDataStore]USER_VIEW.UV_DEMOGRAPHICS_Public.TOTAL_FEMALE_POPULATION\r\n )\r\n ~mainTable [store::CovidDataStore]USER_VIEW.UV_DEMOGRAPHICS_Public\r\n iso3166_1: [store::CovidDataStore]USER_VIEW.UV_DEMOGRAPHICS_Public.ISO3166_1,\r\n iso3166_2: [store::CovidDataStore]USER_VIEW.UV_DEMOGRAPHICS_Public.ISO3166_2,\r\n fips: [store::CovidDataStore]USER_VIEW.UV_DEMOGRAPHICS_Public.FIPS,\r\n latitude: [store::CovidDataStore]USER_VIEW.UV_DEMOGRAPHICS_Public.LATITUDE,\r\n longitude: [store::CovidDataStore]USER_VIEW.UV_DEMOGRAPHICS_Public.LONGITUDE,\r\n state: [store::CovidDataStore]USER_VIEW.UV_DEMOGRAPHICS_Public.STATE,\r\n county: [store::CovidDataStore]USER_VIEW.UV_DEMOGRAPHICS_Public.COUNTY,\r\n totalPopulation: [store::CovidDataStore]USER_VIEW.UV_DEMOGRAPHICS_Public.TOTAL_POPULATION,\r\n totalMalePopulation: [store::CovidDataStore]USER_VIEW.UV_DEMOGRAPHICS_Public.TOTAL_MALE_POPULATION,\r\n totalFemalePopulation: [store::CovidDataStore]USER_VIEW.UV_DEMOGRAPHICS_Public.TOTAL_FEMALE_POPULATION\r\n }\r\n domain::covid::JHUCovid19: Relational\r\n {\r\n ~primaryKey\r\n (\r\n [store::CovidDataStore]USER_VIEW.UV_JHU_COVID_19_Public.COUNTRY_REGION,\r\n [store::CovidDataStore]USER_VIEW.UV_JHU_COVID_19_Public.PROVINCE_STATE,\r\n [store::CovidDataStore]USER_VIEW.UV_JHU_COVID_19_Public.COUNTY,\r\n [store::CovidDataStore]USER_VIEW.UV_JHU_COVID_19_Public.FIPS,\r\n [store::CovidDataStore]USER_VIEW.UV_JHU_COVID_19_Public.CASE_TYPE,\r\n [store::CovidDataStore]USER_VIEW.UV_JHU_COVID_19_Public.CASES,\r\n [store::CovidDataStore]USER_VIEW.UV_JHU_COVID_19_Public.LONG,\r\n [store::CovidDataStore]USER_VIEW.UV_JHU_COVID_19_Public.LAT,\r\n [store::CovidDataStore]USER_VIEW.UV_JHU_COVID_19_Public.ISO3166_1,\r\n [store::CovidDataStore]USER_VIEW.UV_JHU_COVID_19_Public.ISO3166_2,\r\n [store::CovidDataStore]USER_VIEW.UV_JHU_COVID_19_Public.DIFFERENCE,\r\n [store::CovidDataStore]USER_VIEW.UV_JHU_COVID_19_Public.LAST_UPDATED_DATE,\r\n [store::CovidDataStore]USER_VIEW.UV_JHU_COVID_19_Public.LAST_REPORTED_FLAG\r\n )\r\n ~mainTable [store::CovidDataStore]USER_VIEW.UV_JHU_COVID_19_Public\r\n countryRegion: [store::CovidDataStore]USER_VIEW.UV_JHU_COVID_19_Public.COUNTRY_REGION,\r\n provinceState: [store::CovidDataStore]USER_VIEW.UV_JHU_COVID_19_Public.PROVINCE_STATE,\r\n county: [store::CovidDataStore]USER_VIEW.UV_JHU_COVID_19_Public.COUNTY,\r\n fips: [store::CovidDataStore]USER_VIEW.UV_JHU_COVID_19_Public.FIPS,\r\n date: [store::CovidDataStore]USER_VIEW.UV_JHU_COVID_19_Public.DATE,\r\n caseType: [store::CovidDataStore]USER_VIEW.UV_JHU_COVID_19_Public.CASE_TYPE,\r\n cases: [store::CovidDataStore]USER_VIEW.UV_JHU_COVID_19_Public.CASES,\r\n long: [store::CovidDataStore]USER_VIEW.UV_JHU_COVID_19_Public.LONG,\r\n lat: [store::CovidDataStore]USER_VIEW.UV_JHU_COVID_19_Public.LAT,\r\n iso3166_1: [store::CovidDataStore]USER_VIEW.UV_JHU_COVID_19_Public.ISO3166_1,\r\n iso3166_2: [store::CovidDataStore]USER_VIEW.UV_JHU_COVID_19_Public.ISO3166_2,\r\n difference: [store::CovidDataStore]USER_VIEW.UV_JHU_COVID_19_Public.DIFFERENCE,\r\n lastUpdatedDate: [store::CovidDataStore]USER_VIEW.UV_JHU_COVID_19_Public.LAST_UPDATED_DATE,\r\n lastReportedFlag: [store::CovidDataStore]USER_VIEW.UV_JHU_COVID_19_Public.LAST_REPORTED_FLAG,\r\n demographics[domain_covid_Demographics]: [store::CovidDataStore]@JHUCovid19Demographics\r\n }\r\n)\r\n\r\n\r\n###Connection\r\nRelationalDatabaseConnection runtime::connection::SecDivSnowflakeConnection\r\n{\r\n store: store::CovidDataStore;\r\n type: Snowflake;\r\n specification: Snowflake\r\n {\r\n name: 'SECDIVLAKEDEV';\r\n account: 'secdiv';\r\n warehouse: 'DEMO_WH';\r\n region: 'us-east-1';\r\n };\r\n auth: OAuth\r\n {\r\n oauthKey: 'idfs-qa';\r\n scopeName: 'SESSION:ROLE-ANY';\r\n };\r\n}\r\n\r\n\r\n###Runtime\r\nRuntime runtime::SnowflakeRuntime\r\n{\r\n mappings:\r\n [\r\n mapping::CovidDataMapping\r\n ];\r\n connections:\r\n [\r\n store::CovidDataStore:\r\n [\r\n connection_1: runtime::connection::SecDivSnowflakeConnection\r\n ]\r\n ];\r\n}\r\n", + "name": "SourceCode", + "package": "presentation", + "type": "plainText" + } + }, + "id": "" + }, + { + "_type": "entityData", + "versionId": "2.0.2", + "groupId": "example.services.test", + "artifactId": "test", + "versionedEntity": false, + "entityAttributes": { + "path": "domain::testFunction__String_1_", + "classifierPath": "meta::pure::metamodel::function::ConcreteFunctionDefinition", + "package": "domain" + }, + "entity": { + "classifierPath": "meta::pure::metamodel::function::ConcreteFunctionDefinition", + "path": "domain::testFunction__String_1_", + "content": { + "_type": "function", + "body": [ + { + "_type": "string", + "value": "" + } + ], + "name": "testFunction__String_1_", + "package": "domain", + "parameters": [], + "postConstraints": [], + "preConstraints": [], + "returnMultiplicity": { + "lowerBound": 1, + "upperBound": 1 + }, + "returnType": "String" + } + }, + "id": "" + }, + { + "_type": "entityData", + "versionId": "2.0.2", + "groupId": "example.services.test", + "artifactId": "test", + "versionedEntity": false, + "entityAttributes": { + "path": "presentation::07_Register_A_Service", + "classifierPath": "meta::pure::metamodel::text::Text", + "package": "presentation" + }, + "entity": { + "path": "presentation::07_Register_A_Service", + "classifierPath": "meta::pure::metamodel::text::Text", + "content": { + "_type": "text", + "content": "\r\n# Step 5: Register a Service\r\n\r\n`Service` is how we productionize `query`. It includes a `query` as well as\r\nextra information on how to [execute] and [deploy] that query as an API endpoint.\r\n\r\n\r\n## Anatomy of Service Editor\r\n\r\n- `URL Pattern`: unique to each service and can include parameters for the query.\r\n- `Query`: can launch [Query Builder] from here.\r\n- `Execution Keys`: allows creating execution profiles (`runtime + mapping`).\r\n e.g. for different environments: [INT], [QA], and [PROD]\r\n- `Register` 🚀: shows various mode to deploy a service.\r\n", + "name": "07_Register_A_Service", + "package": "presentation", + "type": "markdown" + } + }, + "id": "" + }, + { + "_type": "entityData", + "versionId": "2.0.2", + "groupId": "example.services.test", + "artifactId": "test", + "versionedEntity": false, + "entityAttributes": { + "path": "presentation::03_Define_A_Store", + "classifierPath": "meta::pure::metamodel::text::Text", + "package": "presentation" + }, + "entity": { + "path": "presentation::03_Define_A_Store", + "classifierPath": "meta::pure::metamodel::text::Text", + "content": { + "_type": "text", + "content": "\r\n# Step 2: Define a Store\r\n\r\nUsing the `connection`, [Studio] can fetch `schemas` and `tables` from your DB\r\nand help you define a store.\r\n\r\n\r\n\r\n\r\n###Relational\r\nDatabase CovidData_Store\r\n(\r\n Table COVID_TEST_REPORTS\r\n (\r\n FIPS VARCHAR(20) PRIMARY KEY,\r\n CASE_TYPE VARCHAR(20),\r\n CASES NUMERIC(20, 0),\r\n )\r\n Table DEMOGRAPHICS_INFO\r\n (\r\n FIPS VARCHAR(20) PRIMARY KEY,\r\n STATE VARCHAR(20),\r\n TOTAL_POPULATION NUMERIC(20, 0),\r\n )\r\n Join Covid19Demographics(DEMOGRAPHICS_INFO.FIPS = COVID_TEST_REPORTS.FIPS)\r\n)\r\n\r\n\r\n", + "name": "03_Define_A_Store", + "package": "presentation", + "type": "markdown" + } + }, + "id": "" + }, + { + "_type": "entityData", + "versionId": "2.0.2", + "groupId": "example.services.test", + "artifactId": "test", + "versionedEntity": false, + "entityAttributes": { + "path": "presentation::02_Create_A_Connection", + "classifierPath": "meta::pure::metamodel::text::Text", + "package": "presentation" + }, + "entity": { + "path": "presentation::02_Create_A_Connection", + "classifierPath": "meta::pure::metamodel::text::Text", + "content": { + "_type": "text", + "content": "\r\n# Step 1: Create a Connection\r\n\r\nSpecify a connection to instruct [Studio] on how to `access` to your relational database.\r\n\r\n\r\n\r\n\r\n###Connection\r\nRelationalDatabaseConnection MyConnection\r\n{\r\n type: Snowflake;\r\n specification: Snowflake\r\n {\r\n name: 'SECDIVLAKEDEV';\r\n account: 'secdiv';\r\n warehouse: 'DEMO_WH';\r\n region: 'us-east-1';\r\n };\r\n auth: OAuth\r\n {\r\n oauthKey: 'idfs-qa';\r\n scopeName: 'SESSION:ROLE-ANY';\r\n };\r\n}\r\n\r\n", + "name": "02_Create_A_Connection", + "package": "presentation", + "type": "markdown" + } + }, + "id": "" + }, + { + "_type": "entityData", + "versionId": "2.0.2", + "groupId": "example.services.test", + "artifactId": "test", + "versionedEntity": false, + "entityAttributes": { + "path": "presentation::01_Introduction", + "classifierPath": "meta::pure::metamodel::text::Text", + "package": "presentation" + }, + "entity": { + "path": "presentation::01_Introduction", + "classifierPath": "meta::pure::metamodel::text::Text", + "content": { + "_type": "text", + "content": "# Introduction\r\n\r\n\r\n## Recap: What is Studio?\r\n\r\n\r\n\r\n\r\n## 👷 Support for Relational Database\r\n\r\n- Feature parity with [Pure IDE]: `~80%`\r\n- Mode of edit: via `text editor` using [Pure language]\r\n\r\n\r\n## Demo 🚀: About the Data...\r\n\r\nWe will use a sample [COVID-19] public data (source: [John Hopkins]) materialized\r\nin `Snowflake` relational database (DB).\r\n", + "name": "01_Introduction", + "package": "presentation", + "type": "markdown" + } + }, + "id": "" + }, + { + "_type": "entityData", + "versionId": "2.0.2", + "groupId": "example.services.test", + "artifactId": "test", + "versionedEntity": false, + "entityAttributes": { + "path": "presentation::05_Create_A_Mapping", + "classifierPath": "meta::pure::metamodel::text::Text", + "package": "presentation" + }, + "entity": { + "path": "presentation::05_Create_A_Mapping", + "classifierPath": "meta::pure::metamodel::text::Text", + "content": { + "_type": "text", + "content": "\r\n# Step 3: Create a Mapping\r\n\r\nMap your `store` to your `models` to create a mapping for data transformation.\r\nMap your a `table` to a `class` and each of its `column` to the class's `property`.\r\n\r\n\r\n\r\n\r\n###Mapping\r\nMapping COVID_Data_Mapping\r\n(\r\n Demographics_Model: Relational\r\n {\r\n ~mainTable [CovidData_Store]DEMOGRAPHICS_INFO\r\n ~primaryKey\r\n (\r\n [CovidData_Store]DEMOGRAPHICS_INFO.FIPS\r\n )\r\n\r\n fips: [CovidData_Store]DEMOGRAPHICS_INFO.FIPS,\r\n caseType: [CovidData_Store]DEMOGRAPHICS_INFO.CASE_TYPE,\r\n cases: [CovidData_Store]DEMOGRAPHICS_INFO.CASES\r\n }\r\n}\r\n\r\n\r\n", + "name": "05_Create_A_Mapping", + "package": "presentation", + "type": "markdown" + } + }, + "id": "" + }, + { + "_type": "entityData", + "versionId": "2.0.2", + "groupId": "example.services.test", + "artifactId": "test", + "versionedEntity": false, + "entityAttributes": { + "path": "presentation::00_Welcome", + "classifierPath": "meta::pure::metamodel::text::Text", + "package": "presentation" + }, + "entity": { + "path": "presentation::00_Welcome", + "classifierPath": "meta::pure::metamodel::text::Text", + "content": { + "_type": "text", + "content": "\r\n\r\n [Productionizing Studio] - So, how do I use my models on real data?\r\n\r\n presented by `An Phi` and `Mauricio Uyaguari`\r\n", + "name": "00_Welcome", + "package": "presentation", + "type": "markdown" + } + }, + "id": "" + }, + { + "_type": "entityData", + "versionId": "2.0.2", + "groupId": "example.services.test", + "artifactId": "test", + "versionedEntity": false, + "entityAttributes": { + "path": "presentation::04_Model_Your_Data", + "classifierPath": "meta::pure::metamodel::text::Text", + "package": "presentation" + }, + "entity": { + "path": "presentation::04_Model_Your_Data", + "classifierPath": "meta::pure::metamodel::text::Text", + "content": { + "_type": "text", + "content": "\r\n# Step 3: Model Your Data\r\n\r\nModel your data using `classes`.\r\n\r\n\r\n\r\n\r\n###Pure\r\nClass TestReport_Model\r\n{\r\n fips: String[1];\r\n caseType: String[1];\r\n cases: Number[1];\r\n}\r\n\r\nClass Demographics_Model\r\n{\r\n fips: String[1];\r\n state: String[1];\r\n population: Number[1];\r\n}\r\n\r\n\r\n", + "name": "04_Model_Your_Data", + "package": "presentation", + "type": "markdown" + } + }, + "id": "" + }, + { + "_type": "entityData", + "versionId": "2.0.2", + "groupId": "example.services.test", + "artifactId": "test", + "versionedEntity": false, + "entityAttributes": { + "path": "presentation::06_Build_A_Query", + "classifierPath": "meta::pure::metamodel::text::Text", + "package": "presentation" + }, + "entity": { + "path": "presentation::06_Build_A_Query", + "classifierPath": "meta::pure::metamodel::text::Text", + "content": { + "_type": "text", + "content": "\n", + "name": "06_Build_A_Query", + "package": "presentation", + "type": "markdown" + } + }, + "id": "" + }, + { + "_type": "entityData", + "versionId": "2.0.2", + "groupId": "example.services.test", + "artifactId": "test", + "versionedEntity": false, + "entityAttributes": { + "path": "runtime::SnowflakeRuntime", + "classifierPath": "meta::pure::runtime::PackageableRuntime", + "package": "runtime" + }, + "entity": { + "path": "runtime::SnowflakeRuntime", + "classifierPath": "meta::pure::runtime::PackageableRuntime", + "content": { + "_type": "runtime", + "name": "SnowflakeRuntime", + "package": "runtime", + "runtimeValue": { + "_type": "engineRuntime", + "connections": [ + { + "store": { + "path": "store::CovidDataStore", + "type": "STORE" + }, + "storeConnections": [ + { + "connection": { + "_type": "connectionPointer", + "connection": "runtime::connection::SecDivSnowflakeConnection" + }, + "id": "connection_1" + } + ] + } + ], + "mappings": [ + { + "path": "mapping::CovidDataMapping", + "type": "MAPPING" + } + ] + } + } + }, + "id": "" + }, + { + "_type": "entityData", + "versionId": "2.0.2", + "groupId": "example.services.test", + "artifactId": "test", + "versionedEntity": false, + "entityAttributes": { + "path": "runtime::connection::SecDivSnowflakeConnection", + "classifierPath": "meta::pure::runtime::PackageableConnection", + "package": "runtime::connection" + }, + "entity": { + "path": "runtime::connection::SecDivSnowflakeConnection", + "classifierPath": "meta::pure::runtime::PackageableConnection", + "content": { + "_type": "connection", + "connectionValue": { + "_type": "RelationalDatabaseConnection", + "authenticationStrategy": { + "_type": "oauth", + "oauthKey": "idfs-qa", + "scopeName": "SESSION:ROLE-ANY" + }, + "datasourceSpecification": { + "_type": "snowflake", + "accountName": "secdiv", + "databaseName": "SECDIVLAKEDEV", + "region": "us-east-1", + "warehouseName": "DEMO_WH" + }, + "element": "store::CovidDataStore", + "type": "Snowflake" + }, + "name": "SecDivSnowflakeConnection", + "package": "runtime::connection" + } + }, + "id": "" + }, + { + "_type": "entityData", + "versionId": "2.0.2", + "groupId": "example.services.test", + "artifactId": "test", + "versionedEntity": false, + "entityAttributes": { + "path": "service::MyService", + "classifierPath": "meta::pure::service::metamodel::Service", + "package": "service" + }, + "entity": { + "path": "service::MyService", + "classifierPath": "meta::pure::service::metamodel::Service", + "content": { + "_type": "service", + "autoActivateUpdates": true, + "documentation": "", + "execution": { + "_type": "pureSingleExecution", + "func": { + "_type": "lambda", + "body": [ + { + "_type": "func", + "function": "take", + "parameters": [ + { + "_type": "func", + "function": "project", + "parameters": [ + { + "_type": "func", + "function": "filter", + "parameters": [ + { + "_type": "func", + "function": "getAll", + "parameters": [ + { + "_type": "class", + "fullPath": "domain::covid::JHUCovid19" + } + ] + }, + { + "_type": "lambda", + "body": [ + { + "_type": "func", + "function": "and", + "parameters": [ + { + "_type": "func", + "function": "equal", + "parameters": [ + { + "_type": "property", + "parameters": [ + { + "_type": "var", + "name": "x" + } + ], + "property": "caseType" + }, + { + "_type": "string", + "multiplicity": { + "lowerBound": 1, + "upperBound": 1 + }, + "values": [ + "Confirmed" + ] + } + ] + }, + { + "_type": "func", + "function": "equal", + "parameters": [ + { + "_type": "property", + "parameters": [ + { + "_type": "property", + "parameters": [ + { + "_type": "var", + "name": "x" + } + ], + "property": "demographics" + } + ], + "property": "state" + }, + { + "_type": "string", + "multiplicity": { + "lowerBound": 1, + "upperBound": 1 + }, + "values": [ + "NY" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "_type": "var", + "name": "x" + } + ] + } + ] + }, + { + "_type": "collection", + "multiplicity": { + "lowerBound": 3, + "upperBound": 3 + }, + "values": [ + { + "_type": "lambda", + "body": [ + { + "_type": "property", + "parameters": [ + { + "_type": "var", + "name": "x" + } + ], + "property": "cases" + } + ], + "parameters": [ + { + "_type": "var", + "name": "x" + } + ] + }, + { + "_type": "lambda", + "body": [ + { + "_type": "property", + "parameters": [ + { + "_type": "var", + "name": "x" + } + ], + "property": "caseType" + } + ], + "parameters": [ + { + "_type": "var", + "name": "x" + } + ] + }, + { + "_type": "lambda", + "body": [ + { + "_type": "property", + "parameters": [ + { + "_type": "property", + "parameters": [ + { + "_type": "var", + "name": "x" + } + ], + "property": "demographics" + } + ], + "property": "state" + } + ], + "parameters": [ + { + "_type": "var", + "name": "x" + } + ] + } + ] + }, + { + "_type": "collection", + "multiplicity": { + "lowerBound": 3, + "upperBound": 3 + }, + "values": [ + { + "_type": "string", + "multiplicity": { + "lowerBound": 1, + "upperBound": 1 + }, + "values": [ + "Cases" + ] + }, + { + "_type": "string", + "multiplicity": { + "lowerBound": 1, + "upperBound": 1 + }, + "values": [ + "Case Type" + ] + }, + { + "_type": "string", + "multiplicity": { + "lowerBound": 1, + "upperBound": 1 + }, + "values": [ + "Demographics/State" + ] + } + ] + } + ] + }, + { + "_type": "integer", + "multiplicity": { + "lowerBound": 1, + "upperBound": 1 + }, + "values": [ + 100 + ] + } + ] + } + ], + "parameters": [] + }, + "mapping": "mapping::CovidDataMapping", + "runtime": { + "_type": "runtimePointer", + "runtime": "runtime::SnowflakeRuntime" + } + }, + "name": "MyService", + "owners": [ + "phiankyj", + "uyagum" + ], + "package": "service", + "pattern": "/studio/demo/covid19", + "test": { + "_type": "singleExecutionTest", + "asserts": [], + "data": "" + } + } + }, + "id": "" + }, + { + "_type": "entityData", + "versionId": "2.0.2", + "groupId": "example.services.test", + "artifactId": "test", + "versionedEntity": false, + "entityAttributes": { + "path": "service::MyService2", + "classifierPath": "meta::pure::service::metamodel::Service", + "package": "service" + }, + "entity": { + "path": "service::MyService2", + "classifierPath": "meta::pure::service::metamodel::Service", + "content": { + "_type": "service", + "autoActivateUpdates": true, + "documentation": "", + "execution": { + "_type": "pureSingleExecution", + "func": { + "_type": "lambda", + "body": [ + { + "_type": "func", + "function": "take", + "parameters": [ + { + "_type": "func", + "function": "project", + "parameters": [ + { + "_type": "func", + "function": "filter", + "parameters": [ + { + "_type": "func", + "function": "getAll", + "parameters": [ + { + "_type": "class", + "fullPath": "domain::covid::JHUCovid19" + } + ] + }, + { + "_type": "lambda", + "body": [ + { + "_type": "func", + "function": "and", + "parameters": [ + { + "_type": "func", + "function": "equal", + "parameters": [ + { + "_type": "property", + "parameters": [ + { + "_type": "var", + "name": "x" + } + ], + "property": "caseType" + }, + { + "_type": "string", + "multiplicity": { + "lowerBound": 1, + "upperBound": 1 + }, + "values": [ + "Confirmed" + ] + } + ] + }, + { + "_type": "func", + "function": "equal", + "parameters": [ + { + "_type": "property", + "parameters": [ + { + "_type": "property", + "parameters": [ + { + "_type": "var", + "name": "x" + } + ], + "property": "demographics" + } + ], + "property": "state" + }, + { + "_type": "string", + "multiplicity": { + "lowerBound": 1, + "upperBound": 1 + }, + "values": [ + "NY" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "_type": "var", + "name": "x" + } + ] + } + ] + }, + { + "_type": "collection", + "multiplicity": { + "lowerBound": 3, + "upperBound": 3 + }, + "values": [ + { + "_type": "lambda", + "body": [ + { + "_type": "property", + "parameters": [ + { + "_type": "var", + "name": "x" + } + ], + "property": "cases" + } + ], + "parameters": [ + { + "_type": "var", + "name": "x" + } + ] + }, + { + "_type": "lambda", + "body": [ + { + "_type": "property", + "parameters": [ + { + "_type": "var", + "name": "x" + } + ], + "property": "caseType" + } + ], + "parameters": [ + { + "_type": "var", + "name": "x" + } + ] + }, + { + "_type": "lambda", + "body": [ + { + "_type": "property", + "parameters": [ + { + "_type": "property", + "parameters": [ + { + "_type": "var", + "name": "x" + } + ], + "property": "demographics" + } + ], + "property": "state" + } + ], + "parameters": [ + { + "_type": "var", + "name": "x" + } + ] + } + ] + }, + { + "_type": "collection", + "multiplicity": { + "lowerBound": 3, + "upperBound": 3 + }, + "values": [ + { + "_type": "string", + "multiplicity": { + "lowerBound": 1, + "upperBound": 1 + }, + "values": [ + "Cases" + ] + }, + { + "_type": "string", + "multiplicity": { + "lowerBound": 1, + "upperBound": 1 + }, + "values": [ + "Case Type" + ] + }, + { + "_type": "string", + "multiplicity": { + "lowerBound": 1, + "upperBound": 1 + }, + "values": [ + "Demographics/State" + ] + } + ] + } + ] + }, + { + "_type": "integer", + "multiplicity": { + "lowerBound": 1, + "upperBound": 1 + }, + "values": [ + 100 + ] + } + ] + } + ], + "parameters": [] + }, + "mapping": "mapping::CovidDataMapping", + "runtime": { + "_type": "runtimePointer", + "runtime": "runtime::SnowflakeRuntime" + } + }, + "name": "MyService2", + "owners": [ + "phiankyj", + "uyagum", + "ibramo", + "hannii" + ], + "package": "service", + "pattern": "/ibramo/studio/demo2/covid19", + "test": { + "_type": "singleExecutionTest", + "asserts": [], + "data": "" + } + } + }, + "id": "" + }, + { + "_type": "entityData", + "versionId": "2.0.2", + "groupId": "example.services.test", + "artifactId": "test", + "versionedEntity": false, + "entityAttributes": { + "path": "service::MyService1", + "classifierPath": "meta::pure::service::metamodel::Service", + "package": "service" + }, + "entity": { + "path": "service::MyService1", + "classifierPath": "meta::pure::service::metamodel::Service", + "content": { + "_type": "service", + "autoActivateUpdates": true, + "documentation": "", + "execution": { + "_type": "pureSingleExecution", + "func": { + "_type": "lambda", + "body": [ + { + "_type": "func", + "function": "take", + "parameters": [ + { + "_type": "func", + "function": "project", + "parameters": [ + { + "_type": "func", + "function": "filter", + "parameters": [ + { + "_type": "func", + "function": "getAll", + "parameters": [ + { + "_type": "class", + "fullPath": "domain::covid::JHUCovid19" + } + ] + }, + { + "_type": "lambda", + "body": [ + { + "_type": "func", + "function": "and", + "parameters": [ + { + "_type": "func", + "function": "equal", + "parameters": [ + { + "_type": "property", + "parameters": [ + { + "_type": "var", + "name": "x" + } + ], + "property": "caseType" + }, + { + "_type": "string", + "multiplicity": { + "lowerBound": 1, + "upperBound": 1 + }, + "values": [ + "Confirmed" + ] + } + ] + }, + { + "_type": "func", + "function": "equal", + "parameters": [ + { + "_type": "property", + "parameters": [ + { + "_type": "property", + "parameters": [ + { + "_type": "var", + "name": "x" + } + ], + "property": "demographics" + } + ], + "property": "state" + }, + { + "_type": "string", + "multiplicity": { + "lowerBound": 1, + "upperBound": 1 + }, + "values": [ + "NY" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "_type": "var", + "name": "x" + } + ] + } + ] + }, + { + "_type": "collection", + "multiplicity": { + "lowerBound": 3, + "upperBound": 3 + }, + "values": [ + { + "_type": "lambda", + "body": [ + { + "_type": "property", + "parameters": [ + { + "_type": "var", + "name": "x" + } + ], + "property": "cases" + } + ], + "parameters": [ + { + "_type": "var", + "name": "x" + } + ] + }, + { + "_type": "lambda", + "body": [ + { + "_type": "property", + "parameters": [ + { + "_type": "var", + "name": "x" + } + ], + "property": "caseType" + } + ], + "parameters": [ + { + "_type": "var", + "name": "x" + } + ] + }, + { + "_type": "lambda", + "body": [ + { + "_type": "property", + "parameters": [ + { + "_type": "property", + "parameters": [ + { + "_type": "var", + "name": "x" + } + ], + "property": "demographics" + } + ], + "property": "state" + } + ], + "parameters": [ + { + "_type": "var", + "name": "x" + } + ] + } + ] + }, + { + "_type": "collection", + "multiplicity": { + "lowerBound": 3, + "upperBound": 3 + }, + "values": [ + { + "_type": "string", + "multiplicity": { + "lowerBound": 1, + "upperBound": 1 + }, + "values": [ + "Cases" + ] + }, + { + "_type": "string", + "multiplicity": { + "lowerBound": 1, + "upperBound": 1 + }, + "values": [ + "Case Type" + ] + }, + { + "_type": "string", + "multiplicity": { + "lowerBound": 1, + "upperBound": 1 + }, + "values": [ + "Demographics/State" + ] + } + ] + } + ] + }, + { + "_type": "integer", + "multiplicity": { + "lowerBound": 1, + "upperBound": 1 + }, + "values": [ + 100 + ] + } + ] + } + ], + "parameters": [] + }, + "mapping": "mapping::CovidDataMapping", + "runtime": { + "_type": "runtimePointer", + "runtime": "runtime::SnowflakeRuntime" + } + }, + "name": "MyService1", + "owners": [ + "phiankyj", + "uyagum", + "ibramo", + "hannii" + ], + "package": "service", + "pattern": "/ibramo/studio/demo1/covid19", + "test": { + "_type": "singleExecutionTest", + "asserts": [], + "data": "" + } + } + }, + "id": "" + }, + { + "_type": "entityData", + "versionId": "2.0.2", + "groupId": "example.services.test", + "artifactId": "test", + "versionedEntity": false, + "entityAttributes": { + "path": "store::CovidDataStore", + "classifierPath": "meta::relational::metamodel::Database", + "package": "store" + }, + "entity": { + "path": "store::CovidDataStore", + "classifierPath": "meta::relational::metamodel::Database", + "content": { + "_type": "relational", + "filters": [], + "includedStores": [], + "joins": [ + { + "name": "JHUCovid19Demographics", + "operation": { + "_type": "dynaFunc", + "funcName": "equal", + "parameters": [ + { + "_type": "column", + "column": "FIPS", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_DEMOGRAPHICS_Public" + }, + "tableAlias": "UV_DEMOGRAPHICS_Public" + }, + { + "_type": "column", + "column": "FIPS", + "table": { + "_type": "Table", + "database": "store::CovidDataStore", + "schema": "USER_VIEW", + "table": "UV_JHU_COVID_19_Public" + }, + "tableAlias": "UV_JHU_COVID_19_Public" + } + ] + } + } + ], + "name": "CovidDataStore", + "package": "store", + "schemas": [ + { + "name": "USER_VIEW", + "tables": [ + { + "columns": [ + { + "name": "ISO3166_1", + "nullable": false, + "type": { + "_type": "Varchar", + "size": 16777216 + } + }, + { + "name": "ISO3166_2", + "nullable": false, + "type": { + "_type": "Varchar", + "size": 16777216 + } + }, + { + "name": "FIPS", + "nullable": false, + "type": { + "_type": "Varchar", + "size": 16777216 + } + }, + { + "name": "LATITUDE", + "nullable": false, + "type": { + "_type": "Float" + } + }, + { + "name": "LONGITUDE", + "nullable": false, + "type": { + "_type": "Float" + } + }, + { + "name": "STATE", + "nullable": false, + "type": { + "_type": "Varchar", + "size": 16777216 + } + }, + { + "name": "COUNTY", + "nullable": false, + "type": { + "_type": "Varchar", + "size": 16777216 + } + }, + { + "name": "TOTAL_POPULATION", + "nullable": false, + "type": { + "_type": "Numeric", + "precision": 38, + "scale": 0 + } + }, + { + "name": "TOTAL_MALE_POPULATION", + "nullable": false, + "type": { + "_type": "Numeric", + "precision": 38, + "scale": 0 + } + }, + { + "name": "TOTAL_FEMALE_POPULATION", + "nullable": false, + "type": { + "_type": "Numeric", + "precision": 38, + "scale": 0 + } + } + ], + "name": "UV_DEMOGRAPHICS_Public", + "primaryKey": [ + "ISO3166_1", + "ISO3166_2", + "FIPS", + "LATITUDE", + "LONGITUDE", + "STATE", + "COUNTY", + "TOTAL_POPULATION", + "TOTAL_MALE_POPULATION", + "TOTAL_FEMALE_POPULATION" + ] + }, + { + "columns": [ + { + "name": "COUNTRY_REGION", + "nullable": false, + "type": { + "_type": "Varchar", + "size": 16777216 + } + }, + { + "name": "PROVINCE_STATE", + "nullable": false, + "type": { + "_type": "Varchar", + "size": 16777216 + } + }, + { + "name": "COUNTY", + "nullable": false, + "type": { + "_type": "Varchar", + "size": 16777216 + } + }, + { + "name": "FIPS", + "nullable": false, + "type": { + "_type": "Varchar", + "size": 16777216 + } + }, + { + "name": "DATE", + "nullable": true, + "type": { + "_type": "Date" + } + }, + { + "name": "CASE_TYPE", + "nullable": false, + "type": { + "_type": "Varchar", + "size": 16777216 + } + }, + { + "name": "CASES", + "nullable": false, + "type": { + "_type": "Numeric", + "precision": 38, + "scale": 0 + } + }, + { + "name": "LONG", + "nullable": false, + "type": { + "_type": "Float" + } + }, + { + "name": "LAT", + "nullable": false, + "type": { + "_type": "Float" + } + }, + { + "name": "ISO3166_1", + "nullable": false, + "type": { + "_type": "Varchar", + "size": 16777216 + } + }, + { + "name": "ISO3166_2", + "nullable": false, + "type": { + "_type": "Varchar", + "size": 16777216 + } + }, + { + "name": "DIFFERENCE", + "nullable": false, + "type": { + "_type": "Numeric", + "precision": 38, + "scale": 0 + } + }, + { + "name": "LAST_UPDATED_DATE", + "nullable": false, + "type": { + "_type": "Timestamp" + } + }, + { + "name": "LAST_REPORTED_FLAG", + "nullable": false, + "type": { + "_type": "Bit" + } + } + ], + "name": "UV_JHU_COVID_19_Public", + "primaryKey": [ + "COUNTRY_REGION", + "PROVINCE_STATE", + "COUNTY", + "FIPS", + "CASE_TYPE", + "CASES", + "LONG", + "LAT", + "ISO3166_1", + "ISO3166_2", + "DIFFERENCE", + "LAST_UPDATED_DATE", + "LAST_REPORTED_FLAG" + ] + } + ], + "views": [] + } + ] + } + }, + "id": "" + } +] \ No newline at end of file