Skip to content

Commit

Permalink
Merge pull request #8245 from mandy-chessell/oak2024
Browse files Browse the repository at this point in the history
Separate query for templates
  • Loading branch information
mandy-chessell committed Jun 20, 2024
2 parents 6cf8c12 + 0b32bf2 commit 7404422
Show file tree
Hide file tree
Showing 91 changed files with 2,613 additions and 263 deletions.
2 changes: 1 addition & 1 deletion CoreContentPackGUIDMap.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion content-packs/CloudInformationModel.json

This file was deleted.

2 changes: 1 addition & 1 deletion content-packs/CocoBusinessSystemsArchive.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CocoClinicalTrialsTemplatesArchive.omarchive

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion content-packs/CocoComboArchive.json

This file was deleted.

2 changes: 1 addition & 1 deletion content-packs/CocoComboArchive.omarchive

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion content-packs/CocoGovernanceEngineDefinitionsArchive.json

This file was deleted.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CocoGovernanceProgramArchive.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CocoOrganizationArchive.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CocoSustainabilityArchive.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CocoTypesArchive.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CoreContentPack.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/OpenMetadataTypes.omarchive

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion content-packs/SimpleAPICatalog.json

This file was deleted.

1 change: 0 additions & 1 deletion content-packs/SimpleCatalog.json

This file was deleted.

1 change: 0 additions & 1 deletion content-packs/SimpleDataCatalog.json

This file was deleted.

1 change: 0 additions & 1 deletion content-packs/SimpleEventCatalog.json

This file was deleted.

1 change: 0 additions & 1 deletion content-packs/SimpleGovernanceCatalog.json

This file was deleted.

5 changes: 3 additions & 2 deletions open-metadata-distribution/omag-server-platform/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ dependencies {
implementation project(':open-metadata-implementation:adapters:open-connectors:system-connectors:apache-atlas-connectors')
implementation project(':open-metadata-implementation:adapters:open-connectors:system-connectors:apache-kafka-connectors')
implementation project(':open-metadata-implementation:adapters:open-connectors:system-connectors:egeria-system-connectors')
implementation project(':open-metadata-implementation:adapters:open-connectors:system-connectors:postgres-server-connectors')
implementation project(':open-metadata-implementation:adapters:open-connectors:data-manager-connectors:postgres-server-connectors')
implementation project(':open-metadata-implementation:adapters:open-connectors:data-manager-connectors:unity-catalog-connectors')
implementation project(':open-metadata-implementation:adapters:open-connectors:secrets-store-connectors:env-variable-secrets-store-connector')
implementation project(':open-metadata-implementation:access-services:asset-consumer:asset-consumer-client')
implementation project(':open-metadata-implementation:access-services:asset-lineage:asset-lineage-client')
Expand Down Expand Up @@ -215,7 +216,7 @@ distributions {
from { project(':open-metadata-implementation:adapters:open-connectors:system-connectors:apache-atlas-connectors').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:system-connectors:apache-kafka-connectors').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:system-connectors:egeria-system-connectors').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:system-connectors:postgres-server-connectors').shadowJar }
from { project(':open-metadata-implementation:adapters:open-connectors:data-manager-connectors:postgres-server-connectors').shadowJar }
fileMode = 0755
}
into('assembly/platform/extra') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class AssetContextHandlerTest {
@Mock
private List<String> supportedZones;
@Mock
private OpenMetadataAPIGenericHandler genericHandler;
private OpenMetadataAPIGenericHandler<?> genericHandler;
@Mock
ClockService clockService;
@InjectMocks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class HandlerHelperTest {
@Mock
private OMRSRepositoryHelper repositoryHelper;
@Mock
private OpenMetadataAPIGenericHandler genericHandler;
private OpenMetadataAPIGenericHandler<?> genericHandler;
@Mock
private Converter converter;
@Mock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ private LineageEntity mockLineageEntity(EntityDetail entityDetail) {
return lineageEntity;
}

@SuppressWarnings(value = "unchecked")
private void mockContext(EntityDetail entityDetail, boolean isEmptyContext) throws OCFCheckedExceptionBase, JsonProcessingException {
Multimap<String, RelationshipsContext> context = mock(Multimap.class);
when(context.isEmpty()).thenReturn(isEmptyContext);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ void publishEntities_responseWithUserNotAuthorizedException() throws OCFCheckedE
}

@Test
@SuppressWarnings(value = "unchecked")
void publishEntity_process() throws OCFCheckedExceptionBase, JsonProcessingException {
String methodName = "publishEntity";
mockHandlerHelper(methodName);
Expand All @@ -179,6 +180,7 @@ void publishEntity_process() throws OCFCheckedExceptionBase, JsonProcessingExcep
}

@Test
@SuppressWarnings(value = "unchecked")
void publishEntity_glossaryTerm() throws OCFCheckedExceptionBase, JsonProcessingException {
String methodName = "publishEntity";
mockHandlerHelper(methodName);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
<!-- Copyright Contributors to the Egeria project. -->

# The data manager connectors

The data manager connectors work with data management platforms that
use metadata to describe and control access to data.

* [PostgreSQL Server Connectors](postgres-server-connectors) provides specialist connectors for working with PostgreSQL Servers and their databases.
* [Unity Catalog (UC)](unity-catalog-connectors) provides specialist connectors for working with Unity Catalog.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package org.odpi.openmetadata.adapters.connectors.postgres.catalog;

import org.odpi.openmetadata.adapters.connectors.postgres.controls.PostgresConfigurationProperty;
import org.odpi.openmetadata.adapters.connectors.postgres.controls.PostgresServerCatalogTarget;
import org.odpi.openmetadata.adapters.connectors.postgres.controls.PostgresTarget;
import org.odpi.openmetadata.frameworks.auditlog.AuditLogReportingComponent;
import org.odpi.openmetadata.frameworks.auditlog.ComponentDevelopmentStatus;
import org.odpi.openmetadata.frameworks.connectors.properties.beans.ConnectorType;
Expand Down Expand Up @@ -84,7 +84,7 @@ public PostgresServerIntegrationProvider()

super.setConnectorComponentDescription(componentDescription);

super.catalogTargets = PostgresServerCatalogTarget.getCatalogTargetTypes();
super.catalogTargets = PostgresTarget.getPostgresServerCatalogTargetTypes();
super.supportedConfigurationProperties = PostgresConfigurationProperty.getPostgresServerConfigurationPropertyTypes();
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: Apache-2.0 */
/* Copyright Contributors to the ODPi Egeria project. */

package org.odpi.openmetadata.adapters.connectors.postgres.survey;
package org.odpi.openmetadata.adapters.connectors.postgres.controls;

import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType;
import org.odpi.openmetadata.frameworks.surveyaction.controls.AnalysisStep;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/* Copyright Contributors to the ODPi Egeria project. */
package org.odpi.openmetadata.adapters.connectors.postgres.controls;

import org.odpi.openmetadata.frameworks.governanceaction.controls.ActionTargetType;
import org.odpi.openmetadata.frameworks.openmetadata.refdata.DeployedImplementationType;
import org.odpi.openmetadata.frameworks.integration.controls.CatalogTargetType;

Expand All @@ -14,22 +15,38 @@
* This enables the capability of an integration connector to be correctly matched to the resources and elements
* that it works with.
*/
public enum PostgresServerCatalogTarget
public enum PostgresTarget
{
CATALOG_TARGET("postgreSQLServer",
SERVER("postgreSQLServer",
DeployedImplementationType.POSTGRESQL_SERVER.getDescription(),
DeployedImplementationType.POSTGRESQL_SERVER.getAssociatedTypeName(),
DeployedImplementationType.POSTGRESQL_SERVER.getDeployedImplementationType(),
null);
null),

/**
* PostgreSQL Database.
*/
DATABASE("postgresDatabase",
DeployedImplementationType.POSTGRESQL_DATABASE.getDescription(),
DeployedImplementationType.POSTGRESQL_DATABASE.getAssociatedTypeName(),
DeployedImplementationType.POSTGRESQL_DATABASE.getDeployedImplementationType(),
null),

;;


/**
* Catalog target name.
*/
private final String name;

/**
* Description of the target.
*/
public final String description;

/**
* The open metadata type name of the element that can be a catalog target.
* The open metadata type name of the element that can be a target.
*/
private final String typeName;

Expand All @@ -40,7 +57,7 @@ public enum PostgresServerCatalogTarget
private final String deployedImplementationType;

/**
* A map of property name to property value for values that should match in the catalog target for it to be compatible with this integration
* A map of property name to property value for values that should match in the target for it to be compatible with this integration
* connector.
*/
private final Map<String, String> otherPropertyValues;
Expand All @@ -49,22 +66,28 @@ public enum PostgresServerCatalogTarget
/**
* Constructor for Enum
*
* @param name catalog target name
* @param name target name
* @param description description of target
* @param typeName open metadata type name for the linked element
* @param deployedImplementationType deployed implementation type for the linked element
* @param otherPropertyValues other values
*/
PostgresServerCatalogTarget(String name, String typeName, String deployedImplementationType, Map<String, String> otherPropertyValues)
PostgresTarget(String name,
String description,
String typeName,
String deployedImplementationType,
Map<String, String> otherPropertyValues)
{
this.name = name;
this.description = description;
this.typeName = typeName;
this.deployedImplementationType = deployedImplementationType;
this.otherPropertyValues = otherPropertyValues;
}


/**
* Return the catalog target name.
* Return the target name.
*
* @return string name
*/
Expand All @@ -75,7 +98,18 @@ public String getName()


/**
* Return the type name (or super type name) of a permitted catalog target.
* Return the description of the target.
*
* @return string description
*/
public String getDescription()
{
return description;
}


/**
* Return the type name (or super type name) of a permitted target.
*
* @return name of an open metadata type
*/
Expand All @@ -86,7 +120,7 @@ public String getTypeName()


/**
* Return a more specific definition of a permitted catalog target.
* Return a more specific definition of a permitted target.
*
* @return deployed implementation type name
*/
Expand All @@ -97,7 +131,7 @@ public String getDeployedImplementationType()


/**
* Return a map of property name to property value that the catalog target should have to be valid for this integration connector.
* Return a map of property name to property value that the target should have to be valid for this integration connector.
*
* @return map of string to string
*/
Expand All @@ -110,25 +144,22 @@ public Map<String, String> getOtherPropertyValues()
/**
* Return all the catalog types defined by this enum.
*
* @return list of catalog target type
* @return list of target type
*/
public static List<CatalogTargetType> getCatalogTargetTypes()
public static List<CatalogTargetType> getPostgresServerCatalogTargetTypes()
{
List<CatalogTargetType> catalogTargetTypes = new ArrayList<>();

for (PostgresServerCatalogTarget catalogTarget : PostgresServerCatalogTarget.values())
{
catalogTargetTypes.add(catalogTarget.getCatalogTargetType());
}
catalogTargetTypes.add(SERVER.getCatalogTargetType());

return catalogTargetTypes;
}


/**
* Return the catalog target type for a specific catalog target enum.
* Return the target type for a specific target enum.
*
* @return catalog target type
* @return target type
*/
public CatalogTargetType getCatalogTargetType()
{
Expand All @@ -143,6 +174,55 @@ public CatalogTargetType getCatalogTargetType()
}



/**
* Return the targets defined in this enum for a PostgreSQL server.
*
* @return list
*/
public static List<ActionTargetType> getPostgresServerActionTargetTypes()
{
List<ActionTargetType> actionTargetTypes = new ArrayList<>();

actionTargetTypes.add(SERVER.getActionTargetType());

return actionTargetTypes;
}


/**
* Return the targets defined in this enum for a PostgreSQL database.
*
* @return list
*/
public static List<ActionTargetType> getPostgresDatabaseActionTargetTypes()
{
List<ActionTargetType> actionTargetTypes = new ArrayList<>();

actionTargetTypes.add(DATABASE.getActionTargetType());

return actionTargetTypes;
}


/**
* Return an target type for use in the governance service's provider.
*
* @return target type
*/
public ActionTargetType getActionTargetType()
{
ActionTargetType actionTargetType = new ActionTargetType();

actionTargetType.setName(name);
actionTargetType.setDescription(description);
actionTargetType.setTypeName(typeName);
actionTargetType.setDeployedImplementationType(deployedImplementationType);

return actionTargetType;
}


/**
* JSON-style toString
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

package org.odpi.openmetadata.adapters.connectors.postgres.survey;

import org.odpi.openmetadata.adapters.connectors.postgres.controls.PostgresAnnotationType;
import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException;
import org.odpi.openmetadata.frameworks.surveyaction.SurveyActionServiceConnector;
import org.odpi.openmetadata.frameworks.surveyaction.measurements.RelationalDatabaseMeasurement;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@

package org.odpi.openmetadata.adapters.connectors.postgres.survey;

import org.odpi.openmetadata.adapters.connectors.postgres.controls.PostgresAnnotationType;
import org.odpi.openmetadata.adapters.connectors.postgres.controls.PostgresTarget;
import org.odpi.openmetadata.frameworks.auditlog.AuditLogReportingComponent;
import org.odpi.openmetadata.frameworks.auditlog.ComponentDevelopmentStatus;
import org.odpi.openmetadata.frameworks.connectors.properties.beans.ConnectorType;
import org.odpi.openmetadata.frameworks.openmetadata.refdata.DeployedImplementationType;
import org.odpi.openmetadata.frameworks.surveyaction.SurveyActionServiceProvider;
import org.odpi.openmetadata.frameworks.surveyaction.controls.AnalysisStep;

Expand Down Expand Up @@ -80,7 +81,7 @@ public PostgresDatabaseSurveyActionProvider()

super.setConnectorComponentDescription(componentDescription);

super.supportedActionTargetTypes = PostgresActionTarget.getPostgresDatabaseActionTargetTypes();
super.supportedActionTargetTypes = PostgresTarget.getPostgresDatabaseActionTargetTypes();
super.supportedAnalysisSteps = AnalysisStep.getAnalysisStepTypes(new AnalysisStep[] {
AnalysisStep.CHECK_ASSET, AnalysisStep.PROFILING_ASSOCIATED_RESOURCES});
super.producedAnnotationTypes = PostgresAnnotationType.getPostgresDatabaseAnnotationTypeTypes();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@

package org.odpi.openmetadata.adapters.connectors.postgres.survey;

import org.odpi.openmetadata.adapters.connectors.postgres.controls.PostgresAnnotationType;
import org.odpi.openmetadata.adapters.connectors.postgres.controls.PostgresTarget;
import org.odpi.openmetadata.frameworks.auditlog.AuditLogReportingComponent;
import org.odpi.openmetadata.frameworks.auditlog.ComponentDevelopmentStatus;
import org.odpi.openmetadata.frameworks.connectors.properties.beans.ConnectorType;
import org.odpi.openmetadata.frameworks.openmetadata.refdata.DeployedImplementationType;
import org.odpi.openmetadata.frameworks.surveyaction.SurveyActionServiceProvider;
import org.odpi.openmetadata.frameworks.surveyaction.controls.AnalysisStep;

Expand Down Expand Up @@ -80,7 +81,7 @@ public PostgresServerSurveyActionProvider()

super.setConnectorComponentDescription(componentDescription);

super.supportedActionTargetTypes = PostgresActionTarget.getPostgresServerActionTargetTypes();
super.supportedActionTargetTypes = PostgresTarget.getPostgresServerActionTargetTypes();
super.supportedAnalysisSteps = AnalysisStep.getAnalysisStepTypes(new AnalysisStep[] {
AnalysisStep.CHECK_ASSET, AnalysisStep.PROFILING_ASSOCIATED_RESOURCES});
super.producedAnnotationTypes = PostgresAnnotationType.getPostgresServerAnnotationTypeTypes();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
<!-- Copyright Contributors to the Egeria project. -->


# Unity Catalog Connectors

The connectors in this module support interaction with the open source unity catalog.

See [https://github.com/unitycatalog/unitycatalog](https://github.com/unitycatalog/unitycatalog).

Unity Catalog is an operational metadata catalog that supports controlled access to data managed through a data
platform. It provides metadata to describe the organization of the data. This can be used to overlay a security model to control access.
Loading

0 comments on commit 7404422

Please sign in to comment.