Class DatabaseIntegrationModuleBase
java.lang.Object
org.odpi.openmetadata.adapters.connectors.apacheatlas.integration.modules.AtlasIntegrationModuleBase
org.odpi.openmetadata.adapters.connectors.apacheatlas.integration.modules.AtlasRegisteredIntegrationModuleBase
org.odpi.openmetadata.adapters.connectors.apacheatlas.integration.modules.DatabaseIntegrationModuleBase
- All Implemented Interfaces:
RegisteredIntegrationModule
- Direct Known Subclasses:
ApacheHiveIntegrationModule
,RDBMSIntegrationModule
DatabaseIntegrationModuleBase abstracts the process of synchronizing relational metadata from Apache Atlas, so it is
independent of the actual Apache Atlas types. The subclasses supply the types. This is because Apache Atlas has multiple type
definitions for this type of metadata.
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
Fields inherited from class org.odpi.openmetadata.adapters.connectors.apacheatlas.integration.modules.AtlasIntegrationModuleBase
atlasAssetProperties, atlasClient, atlasCreateTimePropertyName, atlasDataFileProperties, atlasDescriptionPropertyName, atlasDisplayNamePropertyName, atlasModifiedTimePropertyName, atlasNamePropertyName, atlasOwnerPropertyName, atlasPathPropertyName, atlasQualifiedNamePropertyName, atlasUserDescriptionPropertyName, auditLog, collaborationExchangeService, connectionProperties, connectorName, dataAssetExchangeService, egeriaGUIDPropertyName, egeriaOwnedPropertyName, egeriaOwnerPropertyName, egeriaOwnerTypeName, egeriaQualifiedNamePropertyName, egeriaTypeNamePropertyName, embeddedConnectors, moduleName, myContext, openMetadataAccess, openMetadataAssociatedElementPropertyName, openMetadataAssociatedGlossaryPropertyName, openMetadataCorrelationLinkTypeName, openMetadataCorrelationPropertyName, openMetadataCorrelationTypeName, openMetadataGlossaryCorrelationLinkTypeName, propertyHelper, stewardshipExchangeService, targetRootURL
-
Constructor Summary
ConstructorDescriptionDatabaseIntegrationModuleBase
(String connectorName, String moduleName, String atlasDatabaseTypeName, String atlasDatabaseTablesPropertyName, String atlasDatabaseTableTypeName, String atlasDatabaseColumnsPropertyName, String atlasDatabaseColumnTypeName, ConnectionProperties connectionProperties, AuditLog auditLog, CatalogIntegratorContext myContext, String targetRootURL, ApacheAtlasRESTConnector atlasClient, List<Connector> embeddedConnectors) Constructor for the module is supplied with the runtime context in order to operate. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
augmentAtlasDatabaseColumnInEgeria
(AtlasEntityWithExtInfo atlasDatabaseColumnEntity, String egeriaDatabaseColumnGUID) Allow a subclass to attach additional information to the database column.protected void
augmentAtlasDatabaseInEgeria
(AtlasEntityWithExtInfo atlasDatabaseEntity, String egeriaDatabaseGUID) Allow a subclass to attach additional information to the database.protected void
augmentAtlasDatabaseTableInEgeria
(AtlasEntityWithExtInfo atlasDatabaseTableEntity, String egeriaDatabaseTableGUID) Allow a subclass to attach additional information to the database table.protected String
createAtlasDatabaseColumnInEgeria
(AtlasEntityWithExtInfo atlasDatabaseColumnEntity, String egeriaDatabaseTableGUID) Create the database in the open metadata ecosystem.protected String
createAtlasDatabaseInEgeria
(AtlasEntityWithExtInfo atlasDatabaseEntity) Create the database in the open metadata ecosystem.protected String
createAtlasDatabaseTableInEgeria
(AtlasEntityWithExtInfo atlasDatabaseTableEntity, String egeriaDatabaseGUID) Create the database table in the open metadata ecosystem.protected abstract SchemaAttributeProperties
getEgeriaDatabaseColumnProperties
(AtlasEntity atlasEntity, String egeriaSchemaAttributeTypeName, String egeriaSchemaTypeTypeName) Map the properties from the entity retrieved from Apache Atlas to the Egeria properties for the open metadata entity.protected abstract DataAssetProperties
getEgeriaDatabaseProperties
(AtlasEntity atlasEntity, String egeriaTypeName) Map the properties from the entity retrieved from Apache Atlas to the Egeria properties for the open metadata entity.protected String
getEgeriaDatabaseSchemaType
(String egeriaDatabaseGUID) Return the unique identifier of the database schema type for the requested database.protected abstract SchemaAttributeProperties
getEgeriaDatabaseTableProperties
(AtlasEntity atlasEntity, String egeriaSchemaAttributeTypeName, String egeriaSchemaTypeTypeName) Map the properties from the entity retrieved from Apache Atlas to the Egeria properties for the open metadata entity.void
Process an event that was published by the Asset Manager OMAS.void
refresh()
Requests that the connector does a comparison of the metadata in the third party technology and open metadata repositories.protected void
updateAtlasDatabaseColumnInEgeria
(AtlasEntityWithExtInfo atlasDatabaseColumnEntity, String egeriaDatabaseColumnGUID, SchemaAttributeElement egeriaDatabaseColumn) Update the properties of an open metadata database with the current properties from Apache Atlas.protected void
updateAtlasDatabaseInEgeria
(AtlasEntityWithExtInfo atlasDatabaseEntity, String egeriaDatabaseGUID) Update the properties of an open metadata database with the current properties from Apache Atlas.protected void
updateAtlasDatabaseTableInEgeria
(AtlasEntityWithExtInfo atlasDatabaseTableEntity, String egeriaDatabaseTableGUID) Update the properties of an open metadata database table with the current properties from Apache Atlas.Methods inherited from class org.odpi.openmetadata.adapters.connectors.apacheatlas.integration.modules.AtlasRegisteredIntegrationModuleBase
getListenForTypes, getModuleName, getSupportedEntityTypes
Methods inherited from class org.odpi.openmetadata.adapters.connectors.apacheatlas.integration.modules.AtlasIntegrationModuleBase
addPropertyMapToAdditionalProperties, addRemainingPropertiesToAdditionalProperties, addStringArrayToAdditionalProperties, atlasUpdateRequired, createAtlasDataSetAsDataSetInEgeria, egeriaUpdateRequired, ensureAtlasExternalIdentifier, getAtlasBooleanProperty, getAtlasGUID, getAtlasPropertyMap, getAtlasStringArray, getAtlasStringProperty, getDataAssetProperties, getEgeriaDataFileProperties, getEgeriaDataSetProperties, getEgeriaGUID, getExternalIdentifier, getExternalIdentifier, getProcessProperties, getSchemaAttributeProperties, getValidAtlasGUIDs, isAtlasOwnedElement, isEgeriaOwned, isEgeriaOwned, isEgeriaOwned, removeEgeriaGUID, saveEgeriaGUIDInAtlas, setOwner, syncAtlasDataSetAsDataSet, syncAtlasDataSetsAsDataSets, updateAtlasDataSetAsDataSetInEgeria, updateExternalIdentifierAfterAtlasUpdate
-
Field Details
-
egeriaDatabaseTypeName
- See Also:
-
egeriaRootDatabaseSchemaTypeTypeName
- See Also:
-
egeriaDatabaseTableTypeName
- See Also:
-
egeriaDatabaseTableTypeTypeName
- See Also:
-
egeriaDatabaseColumnTypeName
- See Also:
-
egeriaDatabaseColumnTypeTypeName
- See Also:
-
-
Constructor Details
-
DatabaseIntegrationModuleBase
public DatabaseIntegrationModuleBase(String connectorName, String moduleName, String atlasDatabaseTypeName, String atlasDatabaseTablesPropertyName, String atlasDatabaseTableTypeName, String atlasDatabaseColumnsPropertyName, String atlasDatabaseColumnTypeName, ConnectionProperties connectionProperties, AuditLog auditLog, CatalogIntegratorContext myContext, String targetRootURL, ApacheAtlasRESTConnector atlasClient, List<Connector> embeddedConnectors) throws UserNotAuthorizedException Constructor for the module is supplied with the runtime context in order to operate.- Parameters:
connectorName
- name of the connector (for messages)moduleName
- name of this moduleatlasDatabaseTypeName
- name of type in atlas used for the databaseatlasDatabaseTablesPropertyName
- name of the property used to navigate from the database to its tables.atlasDatabaseTableTypeName
- name of the type used to represent a database table in atlasatlasDatabaseColumnsPropertyName
- name of the property used to navigate from a database table to its columnsatlasDatabaseColumnTypeName
- name of the type used to represent a database column in atlasconnectionProperties
- connection properties used to start the connectorauditLog
- logging destinationmyContext
- integration contexttargetRootURL
- URL to connect to Apache AtlasatlasClient
- client to connect to Apache AtlasembeddedConnectors
- list of any embedded connectors (such as secrets connector and topic connector- Throws:
UserNotAuthorizedException
- security problem
-
-
Method Details
-
refresh
Requests that the connector does a comparison of the metadata in the third party technology and open metadata repositories. Refresh is called when the integration connector first starts and then at intervals defined in the connector's configuration as well as any external REST API calls to explicitly refresh the connector.- Throws:
ConnectorCheckedException
- there is a problem with the connector. It is not able to refresh the metadata.
-
processEvent
Process an event that was published by the Asset Manager OMAS. The listener is only registered if metadata is flowing from the open metadata ecosystem to Apache Atlas.- Parameters:
event
- event object
-
getEgeriaDatabaseSchemaType
protected String getEgeriaDatabaseSchemaType(String egeriaDatabaseGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return the unique identifier of the database schema type for the requested database. This may or may not have been created already. The method issues a query to the open metadata ecosystem. If the database schema type is found, its unique identifier is returned. If it is not found, a new database schema type is created and attached to the database entity and the unique identifier of the new database schema type is returned.- Parameters:
egeriaDatabaseGUID
- unique identifier of the database in the open metadata ecosystem.- Returns:
- unique identifier of the database schema type attached to the database. Tables are attached to this object.
- Throws:
InvalidParameterException
- invalid parameter - probably a logic errorUserNotAuthorizedException
- security problemPropertyServerException
- problem communicating with Egeria.
-
createAtlasDatabaseInEgeria
protected String createAtlasDatabaseInEgeria(AtlasEntityWithExtInfo atlasDatabaseEntity) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create the database in the open metadata ecosystem.- Parameters:
atlasDatabaseEntity
- entity retrieved from Apache Atlas- Returns:
- unique identifier of the database entity in open metadata
- Throws:
InvalidParameterException
- invalid parameter - probably a logic errorUserNotAuthorizedException
- security problemPropertyServerException
- unable to communicate with Egeria
-
updateAtlasDatabaseInEgeria
protected void updateAtlasDatabaseInEgeria(AtlasEntityWithExtInfo atlasDatabaseEntity, String egeriaDatabaseGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the properties of an open metadata database with the current properties from Apache Atlas.- Parameters:
atlasDatabaseEntity
- entity retrieved from Apache AtlasegeriaDatabaseGUID
- unique identifier of the equivalent entity in the open metadata ecosystem- Throws:
InvalidParameterException
- invalid parameter - probably a logic errorUserNotAuthorizedException
- security problemPropertyServerException
- unable to communicate with Egeria
-
augmentAtlasDatabaseInEgeria
protected void augmentAtlasDatabaseInEgeria(AtlasEntityWithExtInfo atlasDatabaseEntity, String egeriaDatabaseGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Allow a subclass to attach additional information to the database.- Parameters:
atlasDatabaseEntity
- entity retrieved from Apache AtlasegeriaDatabaseGUID
- unique identifier of the equivalent entity in the open metadata ecosystem- Throws:
InvalidParameterException
- invalid parameter - probably a logic errorUserNotAuthorizedException
- security problemPropertyServerException
- unable to communicate with Egeria
-
createAtlasDatabaseTableInEgeria
protected String createAtlasDatabaseTableInEgeria(AtlasEntityWithExtInfo atlasDatabaseTableEntity, String egeriaDatabaseGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create the database table in the open metadata ecosystem.- Parameters:
atlasDatabaseTableEntity
- entity retrieved from Apache AtlasegeriaDatabaseGUID
- unique identifier of the database in the open metadata ecosystem- Returns:
- unique identifier of the database entity in open metadata
- Throws:
InvalidParameterException
- invalid parameter - probably a logic errorUserNotAuthorizedException
- security problemPropertyServerException
- unable to communicate with Egeria
-
updateAtlasDatabaseTableInEgeria
protected void updateAtlasDatabaseTableInEgeria(AtlasEntityWithExtInfo atlasDatabaseTableEntity, String egeriaDatabaseTableGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the properties of an open metadata database table with the current properties from Apache Atlas.- Parameters:
atlasDatabaseTableEntity
- entity retrieved from Apache AtlasegeriaDatabaseTableGUID
- unique identifier of the equivalent entity in the open metadata ecosystem- Throws:
InvalidParameterException
- invalid parameter - probably a logic errorUserNotAuthorizedException
- security problemPropertyServerException
- unable to communicate with Egeria
-
augmentAtlasDatabaseTableInEgeria
protected void augmentAtlasDatabaseTableInEgeria(AtlasEntityWithExtInfo atlasDatabaseTableEntity, String egeriaDatabaseTableGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Allow a subclass to attach additional information to the database table.- Parameters:
atlasDatabaseTableEntity
- entity retrieved from Apache AtlasegeriaDatabaseTableGUID
- unique identifier of the equivalent entity in the open metadata ecosystem- Throws:
InvalidParameterException
- invalid parameter - probably a logic errorUserNotAuthorizedException
- security problemPropertyServerException
- unable to communicate with Egeria
-
createAtlasDatabaseColumnInEgeria
protected String createAtlasDatabaseColumnInEgeria(AtlasEntityWithExtInfo atlasDatabaseColumnEntity, String egeriaDatabaseTableGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create the database in the open metadata ecosystem.- Parameters:
atlasDatabaseColumnEntity
- entity retrieved from Apache Atlas- Returns:
- unique identifier of the database entity in open metadata
- Throws:
InvalidParameterException
- invalid parameter - probably a logic errorUserNotAuthorizedException
- security problemPropertyServerException
- unable to communicate with Egeria
-
updateAtlasDatabaseColumnInEgeria
protected void updateAtlasDatabaseColumnInEgeria(AtlasEntityWithExtInfo atlasDatabaseColumnEntity, String egeriaDatabaseColumnGUID, SchemaAttributeElement egeriaDatabaseColumn) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the properties of an open metadata database with the current properties from Apache Atlas.- Parameters:
atlasDatabaseColumnEntity
- entity retrieved from Apache AtlasegeriaDatabaseColumnGUID
- unique identifier of the equivalent entity in the open metadata ecosystemegeriaDatabaseColumn
- retrieved entity from the open metadata ecosystem- Throws:
InvalidParameterException
- invalid parameter - probably a logic errorUserNotAuthorizedException
- security problemPropertyServerException
- unable to communicate with Egeria
-
augmentAtlasDatabaseColumnInEgeria
protected void augmentAtlasDatabaseColumnInEgeria(AtlasEntityWithExtInfo atlasDatabaseColumnEntity, String egeriaDatabaseColumnGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Allow a subclass to attach additional information to the database column.- Parameters:
atlasDatabaseColumnEntity
- entity retrieved from Apache AtlasegeriaDatabaseColumnGUID
- unique identifier of the equivalent entity in the open metadata ecosystem- Throws:
InvalidParameterException
- invalid parameter - probably a logic errorUserNotAuthorizedException
- security problemPropertyServerException
- unable to communicate with Egeria
-
getEgeriaDatabaseProperties
protected abstract DataAssetProperties getEgeriaDatabaseProperties(AtlasEntity atlasEntity, String egeriaTypeName) Map the properties from the entity retrieved from Apache Atlas to the Egeria properties for the open metadata entity.- Parameters:
atlasEntity
- retrieve entity from Apache AtlasegeriaTypeName
- name of the type used in the open metadata ecosystem- Returns:
- properties to pass to Egeria
-
getEgeriaDatabaseTableProperties
protected abstract SchemaAttributeProperties getEgeriaDatabaseTableProperties(AtlasEntity atlasEntity, String egeriaSchemaAttributeTypeName, String egeriaSchemaTypeTypeName) Map the properties from the entity retrieved from Apache Atlas to the Egeria properties for the open metadata entity.- Parameters:
atlasEntity
- retrieve entity from Apache AtlasegeriaSchemaAttributeTypeName
- name of the type used in the open metadata ecosystemegeriaSchemaTypeTypeName
- name of the type used in the open metadata ecosystem- Returns:
- properties to pass to Egeria
-
getEgeriaDatabaseColumnProperties
protected abstract SchemaAttributeProperties getEgeriaDatabaseColumnProperties(AtlasEntity atlasEntity, String egeriaSchemaAttributeTypeName, String egeriaSchemaTypeTypeName) Map the properties from the entity retrieved from Apache Atlas to the Egeria properties for the open metadata entity.- Parameters:
atlasEntity
- retrieve entity from Apache AtlasegeriaSchemaAttributeTypeName
- name of the type used in the open metadata ecosystemegeriaSchemaTypeTypeName
- name of the type used in the open metadata ecosystem- Returns:
- properties to pass to Egeria
-