Class OSSUnityCatalogResourceConnector
java.lang.Object
org.odpi.openmetadata.frameworks.connectors.Connector
org.odpi.openmetadata.frameworks.connectors.ConnectorBase
org.odpi.openmetadata.adapters.connectors.unitycatalog.resource.OSSUnityCatalogResourceConnector
- All Implemented Interfaces:
AuditLoggingComponent
,SecureConnectorExtension
,VirtualConnectorExtension
public class OSSUnityCatalogResourceConnector
extends ConnectorBase
implements AuditLoggingComponent
-
Nested Class Summary
Nested classes/interfaces inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
ConnectorBase.ProtectedConnection
-
Field Summary
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
connectedAssetProperties, connectionBean, connectionProperties, connectorInstanceId, embeddedConnectors, messageFormatter, secretsStoreConnectorMap
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreate catalog.createFunction
(FunctionProperties functionProperties) Create function.Create schema.createTable
(String name, String catalogName, String schemaName, String comment, String tableType, String dataSourceFormat, List<ColumnInfo> columns, String storageLocation, Map<String, String> properties) Create table.createTable
(TableProperties tableProperties) Create table.createVolume
(String name, String catalogName, String schemaName, String comment, String volumeType, String storageLocation) Create volume.createVolume
(VolumeProperties volumeProperties) Create volume.void
deleteCatalog
(String name, boolean force) Delete catalog.void
deleteFunction
(String fullName) Delete function.void
deleteSchema
(String fullName, boolean force) Delete schema.void
deleteTable
(String fullName) Delete table.void
deleteVolume
(String fullName) Delete volume.getCatalog
(String name) Get catalog.getCatalogNameFromThreePartName
(String threePartName) The catalog name is in the first segment of the three part name.Return the component description that is used by this connector in the audit log.getFunction
(String fullName) Get function.getNameFromFullName
(String fullName) The full name uses dot separators.Get schema.getSchemaNameFromThreePartName
(String threePartName) The schema name is in the middle segment of the three part name.Get table.Get volume.Get all catalog.listFunctions
(String catalogName, String schemaName) Get all functions.listSchemas
(String catalogName) Get all schema.listTables
(String catalogName, String schemaName) Get all tables.listVolumes
(String catalogName, String schemaName) Get all volumes.void
setAuditLog
(AuditLog auditLog) Receive an audit log object that can be used to record audit log messages.void
setUCInstanceName
(String ucInstanceName) Set up a new instance name (must be called before start()).void
start()
Indicates that the connector is completely configured and can begin processing.Update catalog.Update schema.updateVolume
(String fullName, String newName, String comment) Update volume.Methods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
combineConfigurationProperties, disconnect, disconnectConnectors, equals, getArrayConfigurationProperty, getAssetTypeName, getBooleanConfigurationProperty, getConnectedAssetProperties, getConnection, getConnectorInstanceId, getIntConfigurationProperty, getLongConfigurationProperty, getNetworkAddresses, getStringConfigurationProperty, getSuppliedPlaceholderProperties, hashCode, initialize, initializeConnectedAssetProperties, initializeEmbeddedConnectors, initializeSecretsStoreConnector, isActive, logExceptionRecord, logRecord, logRecord, throwMissingConfigurationProperty, throwMissingResource, throwNoAsset, throwWrongTypeOfAsset, throwWrongTypeOfResource, throwWrongTypeOfRootSchema, toString
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.Connector
clearStatisticProperty, clearStatisticTimestamp, getConnectorStatistics, getStatisticCounter, getStatisticProperty, getStatisticTimestamp, incrementStatisticCounter, initializeStatisticCounter, setStatisticProperty, setStatisticTimestamp
-
Constructor Details
-
OSSUnityCatalogResourceConnector
public OSSUnityCatalogResourceConnector()
-
-
Method Details
-
setAuditLog
Receive an audit log object that can be used to record audit log messages. The caller has initialized it with the correct component description and log destinations.- Specified by:
setAuditLog
in interfaceAuditLoggingComponent
- Parameters:
auditLog
- audit log object
-
getConnectorComponentDescription
Return the component description that is used by this connector in the audit log.- Specified by:
getConnectorComponentDescription
in interfaceAuditLoggingComponent
- Returns:
- id, name, description, wiki page URL.
-
setUCInstanceName
Set up a new instance name (must be called before start()).- Parameters:
ucInstanceName
- new instance name
-
start
Indicates that the connector is completely configured and can begin processing. This call can be used to register with non-blocking services.- Overrides:
start
in classConnectorBase
- Throws:
ConnectorCheckedException
- there is a problem within the connector.
-
getNameFromFullName
The full name uses dot separators. Return the name after the final dot.- Parameters:
fullName
- dotted name- Returns:
- short name
-
getSchemaNameFromThreePartName
The schema name is in the middle segment of the three part name.- Parameters:
threePartName
- dotted name- Returns:
- schemaName
-
getCatalogNameFromThreePartName
The catalog name is in the first segment of the three part name.- Parameters:
threePartName
- dotted name- Returns:
- catalogName
-
createCatalog
public CatalogInfo createCatalog(String name, String comment, Map<String, String> properties) throws PropertyServerExceptionCreate catalog.- Parameters:
name
- name of the catalogcomment
- description of the catalogproperties
- additional properties- Returns:
- resulting catalog info
- Throws:
PropertyServerException
- problem with the call
-
deleteCatalog
Delete catalog.- Parameters:
name
- name of the catalogforce
- force the deletion- Throws:
PropertyServerException
- problem with the call
-
getCatalog
Get catalog.- Parameters:
name
- name of the catalog- Returns:
- resulting catalog info
- Throws:
PropertyServerException
- problem with the call
-
listCatalogs
Get all catalog.- Returns:
- resulting catalog info
- Throws:
PropertyServerException
- problem with the call
-
updateCatalog
public CatalogInfo updateCatalog(String name, String newName, String comment, Map<String, String> properties) throws PropertyServerExceptionUpdate catalog. This call overrides all existing properties.- Parameters:
name
- name of the catalognewName
- optional new name of the catalogcomment
- description of the catalogproperties
- additional properties- Returns:
- resulting catalog info
- Throws:
PropertyServerException
- problem with the call
-
createSchema
public SchemaInfo createSchema(String name, String catalogName, String comment, Map<String, String> properties) throws PropertyServerExceptionCreate schema.- Parameters:
name
- name of the schemacatalogName
- name of catalogcomment
- description of the schemaproperties
- additional properties- Returns:
- resulting schema info
- Throws:
PropertyServerException
- problem with the call
-
deleteSchema
Delete schema.- Parameters:
fullName
- fullName of the schemaforce
- force the deletion- Throws:
PropertyServerException
- problem with the call
-
getSchema
Get schema.- Parameters:
fullName
- fullName of the schema- Returns:
- resulting schema info
- Throws:
PropertyServerException
- problem with the call
-
listSchemas
Get all schema.- Returns:
- resulting schema info
- Throws:
PropertyServerException
- problem with the call
-
updateSchema
public SchemaInfo updateSchema(String fullName, String newName, String comment, Map<String, String> properties) throws PropertyServerExceptionUpdate schema.- Parameters:
fullName
- name of the schemanewName
- optional new name of the schemacomment
- description of the schemaproperties
- additional properties- Returns:
- resulting schema info
- Throws:
PropertyServerException
- problem with the call
-
createVolume
public VolumeInfo createVolume(String name, String catalogName, String schemaName, String comment, String volumeType, String storageLocation) throws PropertyServerException Create volume.- Parameters:
name
- name of the volumecatalogName
- name of catalogschemaName
- name of the schemacomment
- description of the volumevolumeType
- MANAGED, or EXTERNALstorageLocation
- directory name eg file:///Users/me/Code/uc/unitycatalog/etc/data/external/unity/default/volumes/json_files/- Returns:
- resulting volume info
- Throws:
PropertyServerException
- problem with the call
-
createVolume
Create volume.- Parameters:
volumeProperties
- properties- Returns:
- resulting volume info
- Throws:
PropertyServerException
- problem with the call
-
deleteVolume
Delete volume.- Parameters:
fullName
- fullName of the volume- Throws:
PropertyServerException
- problem with the call
-
getVolume
Get volume.- Parameters:
fullName
- fullName of the volume- Returns:
- resulting volume info
- Throws:
PropertyServerException
- problem with the call
-
listVolumes
public List<VolumeInfo> listVolumes(String catalogName, String schemaName) throws PropertyServerException Get all volumes.- Parameters:
catalogName
- name of the catalogschemaName
- name of the schema- Returns:
- resulting volume info
- Throws:
PropertyServerException
- problem with the call
-
updateVolume
public VolumeInfo updateVolume(String fullName, String newName, String comment) throws PropertyServerException Update volume.- Parameters:
fullName
- name of the volumenewName
- optional new name of the volumecomment
- description of the volume- Returns:
- resulting volume info
- Throws:
PropertyServerException
- problem with the call
-
createTable
public TableInfo createTable(String name, String catalogName, String schemaName, String comment, String tableType, String dataSourceFormat, List<ColumnInfo> columns, String storageLocation, Map<String, String> properties) throws PropertyServerExceptionCreate table.- Parameters:
name
- name of the tablecatalogName
- name of catalogschemaName
- name of the schemacomment
- description of the tabletableType
- MANAGED, or EXTERNALdataSourceFormat
- formatcolumns
- list of columns in the tablestorageLocation
- directory name eg file:///Users/me/Code/uc/unitycatalog/etc/data/external/unity/default/tables/json_files/- Returns:
- resulting table info
- Throws:
PropertyServerException
- problem with the call
-
createTable
Create table.- Parameters:
tableProperties
- list of properties for the table- Returns:
- resulting table info
- Throws:
PropertyServerException
- problem with the call
-
deleteTable
Delete table.- Parameters:
fullName
- fullName of the table- Throws:
PropertyServerException
- problem with the call
-
getTable
Get table.- Parameters:
fullName
- fullName of the table- Returns:
- resulting table info
- Throws:
PropertyServerException
- problem with the call
-
listTables
public List<TableInfo> listTables(String catalogName, String schemaName) throws PropertyServerException Get all tables.- Parameters:
catalogName
- name of the catalogschemaName
- name of the schema- Returns:
- resulting table info
- Throws:
PropertyServerException
- problem with the call
-
createFunction
public FunctionInfo createFunction(FunctionProperties functionProperties) throws PropertyServerException Create function.- Parameters:
functionProperties
- list of properties for the function- Returns:
- resulting function info
- Throws:
PropertyServerException
- problem with the call
-
deleteFunction
Delete function.- Parameters:
fullName
- fullName of the function- Throws:
PropertyServerException
- problem with the call
-
getFunction
Get function.- Parameters:
fullName
- fullName of the function- Returns:
- resulting function info
- Throws:
PropertyServerException
- problem with the call
-
listFunctions
public List<FunctionInfo> listFunctions(String catalogName, String schemaName) throws PropertyServerException Get all functions.- Parameters:
catalogName
- name of the catalogschemaName
- name of the schema- Returns:
- resulting function info
- Throws:
PropertyServerException
- problem with the call
-