Package com.databricks.jdbc.api
Interface IDatabricksUCVolumeClient
-
- All Known Implementing Classes:
DatabricksUCVolumeClient
public interface IDatabricksUCVolumeClient
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleandeleteObject(String catalog, String schema, String volume, String objectPath)deleteObject(): Remove an object from a specified path within a UC Volumeorg.apache.http.entity.InputStreamEntitygetObject(String catalog, String schema, String volume, String objectPath)getObject(): Retrieves an object as input stream from the UC VolumebooleangetObject(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 pathList<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.booleanobjectExists(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 exactlybooleanprefixExists(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.booleanputObject(String catalog, String schema, String volume, String objectPath, InputStream inputStream, long contentLength, boolean toOverwrite)putObject(): Upload data from an input stream to a specified path within a UC Volume.booleanputObject(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.booleanvolumeExists(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 storageschema- the schema name of the cloud storagevolume- the UC volume name of the cloud storageprefix- the prefix to check for existence along with the relative path from the volume as the root directorycaseSensitive- 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 storageschema- the schema name of the cloud storagevolume- the UC volume name of the cloud storageobjectPath- 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 storageschema- the schema name of the cloud storagevolumeName- the name of the volume to check for existencecaseSensitive- 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 storageschema- the schema name of the cloud storagevolume- the UC volume name of the cloud storageprefix- the prefix of the filenames to list. This includes the relative path from the volume as the root directorycaseSensitive- 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 storageschema- the schema name of the cloud storagevolume- the UC volume name of the cloud storageobjectPath- the path of the object (file) from the volume as the root directorylocalPath- the local path where the retrieved data is to be stored- Returns:
- a boolean value indicating status of the GET operation
- Throws:
SQLException
-
getObject
org.apache.http.entity.InputStreamEntity getObject(String catalog, String schema, String volume, String objectPath) throws SQLException
getObject(): Retrieves an object as input stream from the UC Volume- Parameters:
catalog- the catalog name of the cloud storageschema- the schema name of the cloud storagevolume- the UC volume name of the cloud storageobjectPath- the path of the object (file) from the volume as the root directory- Returns:
- an instance of input stream entity
- 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 storageschema- the schema name of the cloud storagevolume- the UC volume name of the cloud storageobjectPath- the destination path where the object (file) is to be uploaded from the volume as the root directorylocalPath- the local path from where the data is to be uploadedtoOverwrite- 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, long contentLength, 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 storageschema- the schema name of the cloud storagevolume- the UC volume name of the cloud storageobjectPath- the destination path where the object (file) is to be uploaded from the volume as the root directoryinputStream- the input stream from where the data is to be uploadedcontentLength- the length of the input streamtoOverwrite- 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 storageschema- the schema name of the cloud storagevolume- the UC volume name of the cloud storageobjectPath- 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
-
-