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 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:
      setAuditLog in interface org.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:
      getConnectorComponentDescription in interface org.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent
      Returns:
      id, name, description, wiki page URL.
    • setUCInstanceName

      public void setUCInstanceName(String ucInstanceName)
      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.ConnectorCheckedException
      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 class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException - there is a problem within the connector.
    • getNameFromFullName

      public String getNameFromFullName(String fullName)
      The full name uses dot separators. Return the name after the final dot.
      Parameters:
      fullName - dotted name
      Returns:
      short name
    • getSchemaNameFromThreePartName

      public String getSchemaNameFromThreePartName(String threePartName)
      The schema name is in the middle segment of the three part name.
      Parameters:
      threePartName - dotted name
      Returns:
      schemaName
    • getCatalogNameFromThreePartName

      public String getCatalogNameFromThreePartName(String threePartName)
      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.PropertyServerException
      Create catalog.
      Parameters:
      name - name of the catalog
      comment - description of the catalog
      properties - 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 catalog
      force - 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.PropertyServerException
      Get 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.PropertyServerException
      Update catalog. This call overrides all existing properties.
      Parameters:
      name - name of the catalog
      newName - optional new name of the catalog
      comment - description of the catalog
      properties - 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.PropertyServerException
      Create schema.
      Parameters:
      name - name of the schema
      catalogName - name of catalog
      comment - description of the schema
      properties - 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 schema
      force - 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.PropertyServerException
      Update schema.
      Parameters:
      fullName - name of the schema
      newName - optional new name of the schema
      comment - description of the schema
      properties - 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 volume
      catalogName - name of catalog
      schemaName - name of the schema
      comment - description of the volume
      volumeType - MANAGED, or EXTERNAL
      storageLocation - 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 catalog
      schemaName - 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 volume
      newName - optional new name of the volume
      comment - 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.PropertyServerException
      Create table.
      Parameters:
      name - name of the table
      catalogName - name of catalog
      schemaName - name of the schema
      comment - description of the table
      tableType - MANAGED, or EXTERNAL
      dataSourceFormat - format
      columns - list of columns in the table
      storageLocation - 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 catalog
      schemaName - 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 catalog
      schemaName - name of the schema
      Returns:
      resulting function info
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem with the call