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:
org.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent,org.odpi.openmetadata.frameworks.connectors.SecureConnectorExtension,org.odpi.openmetadata.frameworks.connectors.VirtualConnectorExtension
public class OSSUnityCatalogResourceConnector
extends org.odpi.openmetadata.frameworks.connectors.ConnectorBase
implements org.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate catalog.createFunction(FunctionProperties functionProperties) Create function.Create schema.createTable(String name, String catalogName, String schemaName, String comment, TableType tableType, DataSourceFormat 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, VolumeType volumeType, String storageLocation) Create volume.createVolume(VolumeProperties volumeProperties) Create volume.voiddeleteCatalog(String name, boolean force) Delete catalog.voiddeleteFunction(String fullName) Delete function.voiddeleteSchema(String fullName, boolean force) Delete schema.voiddeleteTable(String fullName) Delete table.voiddeleteVolume(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.org.odpi.openmetadata.frameworks.auditlog.ComponentDescriptionReturn 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.voidsetAuditLog(org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) Receive an audit log object that can be used to record audit log messages.voidsetUCInstanceName(String ucInstanceName) Set up a new instance name (must be called before start()).voidstart()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
disconnect, equals, getConnectedAssetProperties, getConnection, getConnectorInstanceId, hashCode, initialize, initializeConnectedAssetProperties, initializeEmbeddedConnectors, initializeSecretsStoreConnector, isActive, toStringMethods 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
public void setAuditLog(org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) 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:
setAuditLogin interfaceorg.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent- Parameters:
auditLog- audit log object
-
getConnectorComponentDescription
public org.odpi.openmetadata.frameworks.auditlog.ComponentDescription getConnectorComponentDescription()Return the component description that is used by this connector in the audit log.- Specified by:
getConnectorComponentDescriptionin interfaceorg.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent- 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
public void start() throws org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedExceptionIndicates that the connector is completely configured and can begin processing. This call can be used to register with non-blocking services.- Overrides:
startin classorg.odpi.openmetadata.frameworks.connectors.ConnectorBase- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.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 org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerExceptionCreate catalog.- Parameters:
name- name of the catalogcomment- description of the catalogproperties- additional properties- Returns:
- resulting catalog info
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem with the call
-
deleteCatalog
public void deleteCatalog(String name, boolean force) throws org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Delete catalog.- Parameters:
name- name of the catalogforce- force the deletion- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem with the call
-
getCatalog
public CatalogInfo getCatalog(String name) throws org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Get catalog.- Parameters:
name- name of the catalog- Returns:
- resulting catalog info
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem with the call
-
listCatalogs
public List<CatalogInfo> listCatalogs() throws org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerExceptionGet all catalog.- Returns:
- resulting catalog info
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem with the call
-
updateCatalog
public CatalogInfo updateCatalog(String name, String newName, String comment, Map<String, String> properties) throws org.odpi.openmetadata.frameworks.connectors.ffdc.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:
org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem with the call
-
createSchema
public SchemaInfo createSchema(String name, String catalogName, String comment, Map<String, String> properties) throws org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerExceptionCreate schema.- Parameters:
name- name of the schemacatalogName- name of catalogcomment- description of the schemaproperties- additional properties- Returns:
- resulting schema info
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem with the call
-
deleteSchema
public void deleteSchema(String fullName, boolean force) throws org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Delete schema.- Parameters:
fullName- fullName of the schemaforce- force the deletion- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem with the call
-
getSchema
public SchemaInfo getSchema(String fullName) throws org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Get schema.- Parameters:
fullName- fullName of the schema- Returns:
- resulting schema info
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem with the call
-
listSchemas
public List<SchemaInfo> listSchemas(String catalogName) throws org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Get all schema.- Returns:
- resulting schema info
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem with the call
-
updateSchema
public SchemaInfo updateSchema(String fullName, String newName, String comment, Map<String, String> properties) throws org.odpi.openmetadata.frameworks.connectors.ffdc.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:
org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem with the call
-
createVolume
public VolumeInfo createVolume(String name, String catalogName, String schemaName, String comment, VolumeType volumeType, String storageLocation) throws org.odpi.openmetadata.frameworks.connectors.ffdc.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:
org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem with the call
-
createVolume
public VolumeInfo createVolume(VolumeProperties volumeProperties) throws org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Create volume.- Parameters:
volumeProperties- properties- Returns:
- resulting volume info
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem with the call
-
deleteVolume
public void deleteVolume(String fullName) throws org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Delete volume.- Parameters:
fullName- fullName of the volume- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem with the call
-
getVolume
public VolumeInfo getVolume(String fullName) throws org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Get volume.- Parameters:
fullName- fullName of the volume- Returns:
- resulting volume info
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem with the call
-
listVolumes
public List<VolumeInfo> listVolumes(String catalogName, String schemaName) throws org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Get all volumes.- Parameters:
catalogName- name of the catalogschemaName- name of the schema- Returns:
- resulting volume info
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem with the call
-
updateVolume
public VolumeInfo updateVolume(String fullName, String newName, String comment) throws org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Update volume.- Parameters:
fullName- name of the volumenewName- optional new name of the volumecomment- description of the volume- Returns:
- resulting volume info
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem with the call
-
createTable
public TableInfo createTable(String name, String catalogName, String schemaName, String comment, TableType tableType, DataSourceFormat dataSourceFormat, List<ColumnInfo> columns, String storageLocation, Map<String, String> properties) throws org.odpi.openmetadata.frameworks.connectors.ffdc.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:
org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem with the call
-
createTable
public TableInfo createTable(TableProperties tableProperties) throws org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Create table.- Parameters:
tableProperties- list of properties for the table- Returns:
- resulting table info
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem with the call
-
deleteTable
public void deleteTable(String fullName) throws org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Delete table.- Parameters:
fullName- fullName of the table- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem with the call
-
getTable
public TableInfo getTable(String fullName) throws org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Get table.- Parameters:
fullName- fullName of the table- Returns:
- resulting table info
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem with the call
-
listTables
public List<TableInfo> listTables(String catalogName, String schemaName) throws org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Get all tables.- Parameters:
catalogName- name of the catalogschemaName- name of the schema- Returns:
- resulting table info
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem with the call
-
createFunction
public FunctionInfo createFunction(FunctionProperties functionProperties) throws org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Create function.- Parameters:
functionProperties- list of properties for the function- Returns:
- resulting function info
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem with the call
-
deleteFunction
public void deleteFunction(String fullName) throws org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Delete function.- Parameters:
fullName- fullName of the function- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem with the call
-
getFunction
public FunctionInfo getFunction(String fullName) throws org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Get function.- Parameters:
fullName- fullName of the function- Returns:
- resulting function info
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem with the call
-
listFunctions
public List<FunctionInfo> listFunctions(String catalogName, String schemaName) throws org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Get all functions.- Parameters:
catalogName- name of the catalogschemaName- name of the schema- Returns:
- resulting function info
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem with the call
-