Class DatabricksUCVolumeClient
- java.lang.Object
-
- com.databricks.jdbc.client.impl.sdk.DatabricksUCVolumeClient
-
- All Implemented Interfaces:
IDatabricksUCVolumeClient
public class DatabricksUCVolumeClient extends Object implements IDatabricksUCVolumeClient
Implementation for DatabricksUCVolumeClient
-
-
Constructor Summary
Constructors Constructor Description DatabricksUCVolumeClient(Connection connection)
-
Method Summary
All Methods Instance Methods Concrete 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 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)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.booleanobjectExists(String catalog, String schema, String volume, String objectPath)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)booleanprefixExists(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, 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)booleanvolumeExists(String catalog, String schema, String volumeName, boolean caseSensitive)volumeExists(): Determines if a specific volume exists in the given catalog and schema.
-
-
-
Constructor Detail
-
DatabricksUCVolumeClient
public DatabricksUCVolumeClient(Connection connection)
-
-
Method Detail
-
prefixExists
public boolean prefixExists(String catalog, String schema, String volume, String prefix) throws SQLException
- Throws:
SQLException
-
prefixExists
public boolean prefixExists(String catalog, String schema, String volume, String prefix, boolean caseSensitive) throws SQLException
Description copied from interface:IDatabricksUCVolumeClientprefixExists(): 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.- Specified by:
prefixExistsin interfaceIDatabricksUCVolumeClient- 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
public boolean objectExists(String catalog, String schema, String volume, String objectPath, boolean caseSensitive) throws SQLException
Description copied from interface:IDatabricksUCVolumeClientobjectExists(): Determines if a specific object (file) exists in the UC Volume The object that we are looking for must match the file name exactly- Specified by:
objectExistsin interfaceIDatabricksUCVolumeClient- 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
-
objectExists
public boolean objectExists(String catalog, String schema, String volume, String objectPath) throws SQLException
- Throws:
SQLException
-
volumeExists
public boolean volumeExists(String catalog, String schema, String volumeName, boolean caseSensitive) throws SQLException
Description copied from interface:IDatabricksUCVolumeClientvolumeExists(): 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.- Specified by:
volumeExistsin interfaceIDatabricksUCVolumeClient- 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
-
volumeExists
public boolean volumeExists(String catalog, String schema, String volumeName) throws SQLException
- Throws:
SQLException
-
listObjects
public List<String> listObjects(String catalog, String schema, String volume, String prefix, boolean caseSensitive) throws SQLException
Description copied from interface:IDatabricksUCVolumeClientlistObjects(): 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.- Specified by:
listObjectsin interfaceIDatabricksUCVolumeClient- 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
-
listObjects
public List<String> listObjects(String catalog, String schema, String volume, String prefix) throws SQLException
- Throws:
SQLException
-
getObject
public boolean getObject(String catalog, String schema, String volume, String objectPath, String localPath) throws SQLException
Description copied from interface:IDatabricksUCVolumeClientgetObject(): Retrieves an object (file) from the UC Volume and stores it in the local path- Specified by:
getObjectin interfaceIDatabricksUCVolumeClient- 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
-
putObject
public boolean putObject(String catalog, String schema, String volume, String objectPath, String localPath, boolean toOverwrite) throws SQLException
Description copied from interface:IDatabricksUCVolumeClientputObject(): Upload data from a local path to a specified path within a UC Volume.- Specified by:
putObjectin interfaceIDatabricksUCVolumeClient- 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
-
deleteObject
public boolean deleteObject(String catalog, String schema, String volume, String objectPath) throws SQLException
Description copied from interface:IDatabricksUCVolumeClientdeleteObject(): Remove an object from a specified path within a UC Volume- Specified by:
deleteObjectin interfaceIDatabricksUCVolumeClient- 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
-
-