Interface IDatabricksUCVolumeClient

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean deleteObject​(String catalog, String schema, String volume, String objectPath)
      deleteObject(): Remove an object from a specified path within a UC Volume
      boolean getObject​(String catalog, String schema, String volume, String objectPath, String localPath)
      getObject(): Retrieves an object (file) from the UC Volume and stores it in the local path
      List<String> listObjects​(String catalog, String schema, String volume, String prefix, boolean caseSensitive)
      listObjects(): Lists all filenames in the UC Volume that start with a specified prefix.
      boolean objectExists​(String catalog, String schema, String volume, String objectPath, boolean caseSensitive)
      objectExists(): Determines if a specific object (file) exists in the UC Volume The object that we are looking for must match the file name exactly
      boolean prefixExists​(String catalog, String schema, String volume, String prefix, boolean caseSensitive)
      prefixExists(): Determines if a specific prefix (folder-like structure) exists in the UC Volume The prefix that we are looking for must be a part of the file name.
      boolean putObject​(String catalog, String schema, String volume, String objectPath, InputStream inputStream, boolean toOverwrite)
      putObject(): Upload data from an input stream to a specified path within a UC Volume.
      boolean putObject​(String catalog, String schema, String volume, String objectPath, String localPath, boolean toOverwrite)
      putObject(): Upload data from a local path to a specified path within a UC Volume.
      boolean volumeExists​(String catalog, String schema, String volumeName, boolean caseSensitive)
      volumeExists(): Determines if a specific volume exists in the given catalog and schema.
    • Method Detail

      • prefixExists

        boolean prefixExists​(String catalog,
                             String schema,
                             String volume,
                             String prefix,
                             boolean caseSensitive)
                      throws SQLException
        prefixExists(): Determines if a specific prefix (folder-like structure) exists in the UC Volume The prefix that we are looking for must be a part of the file name.
        Parameters:
        catalog - the catalog name of the cloud storage
        schema - the schema name of the cloud storage
        volume - the UC volume name of the cloud storage
        prefix - the prefix to check for existence along with the relative path from the volume as the root directory
        caseSensitive - a boolean indicating whether the check should be case-sensitive or not
        Returns:
        a boolean indicating whether the prefix exists or not
        Throws:
        SQLException
      • objectExists

        boolean objectExists​(String catalog,
                             String schema,
                             String volume,
                             String objectPath,
                             boolean caseSensitive)
                      throws SQLException
        objectExists(): Determines if a specific object (file) exists in the UC Volume The object that we are looking for must match the file name exactly
        Parameters:
        catalog - the catalog name of the cloud storage
        schema - the schema name of the cloud storage
        volume - the UC volume name of the cloud storage
        objectPath - the path of the object (file) from the volume as the root directory to check for existence within the volume (inside any sub-folder)
        caseSensitive - a boolean indicating whether the check should be case-sensitive or not
        Returns:
        a boolean indicating whether the object exists or not
        Throws:
        SQLException
      • volumeExists

        boolean volumeExists​(String catalog,
                             String schema,
                             String volumeName,
                             boolean caseSensitive)
                      throws SQLException
        volumeExists(): Determines if a specific volume exists in the given catalog and schema. The volume that we are looking for must match the volume name exactly.
        Parameters:
        catalog - the catalog name of the cloud storage
        schema - the schema name of the cloud storage
        volumeName - the name of the volume to check for existence
        caseSensitive - a boolean indicating whether the check should be case-sensitive or not
        Returns:
        a boolean indicating whether the volume exists or not
        Throws:
        SQLException
      • listObjects

        List<String> listObjects​(String catalog,
                                 String schema,
                                 String volume,
                                 String prefix,
                                 boolean caseSensitive)
                          throws SQLException
        listObjects(): Lists all filenames in the UC Volume that start with a specified prefix. The prefix that we are looking for must be a part of the file path from the volume as the root.
        Parameters:
        catalog - the catalog name of the cloud storage
        schema - the schema name of the cloud storage
        volume - the UC volume name of the cloud storage
        prefix - the prefix of the filenames to list. This includes the relative path from the volume as the root directory
        caseSensitive - a boolean indicating whether the check should be case-sensitive or not
        Returns:
        a list of strings indicating the filenames that start with the specified prefix
        Throws:
        SQLException
      • getObject

        boolean getObject​(String catalog,
                          String schema,
                          String volume,
                          String objectPath,
                          String localPath)
                   throws SQLException
        getObject(): Retrieves an object (file) from the UC Volume and stores it in the local path
        Parameters:
        catalog - the catalog name of the cloud storage
        schema - the schema name of the cloud storage
        volume - the UC volume name of the cloud storage
        objectPath - the path of the object (file) from the volume as the root directory
        localPath - the local path where the retrieved data is to be stored
        Returns:
        a boolean value indicating status of the GET operation
        Throws:
        SQLException
      • putObject

        boolean putObject​(String catalog,
                          String schema,
                          String volume,
                          String objectPath,
                          String localPath,
                          boolean toOverwrite)
                   throws SQLException
        putObject(): Upload data from a local path to a specified path within a UC Volume.
        Parameters:
        catalog - the catalog name of the cloud storage
        schema - the schema name of the cloud storage
        volume - the UC volume name of the cloud storage
        objectPath - the destination path where the object (file) is to be uploaded from the volume as the root directory
        localPath - the local path from where the data is to be uploaded
        toOverwrite - a boolean indicating whether to overwrite the object if it already exists
        Returns:
        a boolean value indicating status of the PUT operation
        Throws:
        SQLException
      • putObject

        boolean putObject​(String catalog,
                          String schema,
                          String volume,
                          String objectPath,
                          InputStream inputStream,
                          boolean toOverwrite)
                   throws SQLException
        putObject(): Upload data from an input stream to a specified path within a UC Volume.
        Parameters:
        catalog - the catalog name of the cloud storage
        schema - the schema name of the cloud storage
        volume - the UC volume name of the cloud storage
        objectPath - the destination path where the object (file) is to be uploaded from the volume as the root directory
        inputStream - the input stream from where the data is to be uploaded
        toOverwrite - a boolean indicating whether to overwrite the object if it already exists
        Returns:
        a boolean value indicating status of the PUT operation
        Throws:
        SQLException
      • deleteObject

        boolean deleteObject​(String catalog,
                             String schema,
                             String volume,
                             String objectPath)
                      throws SQLException
        deleteObject(): Remove an object from a specified path within a UC Volume
        Parameters:
        catalog - the catalog name of the cloud storage
        schema - the schema name of the cloud storage
        volume - the UC volume name of the cloud storage
        objectPath - the path of the object (file) from the volume as the root directory to delete
        Returns:
        a boolean value indicating status of the DELETE operation
        Throws:
        SQLException