Interface IDatabricksSession
- All Known Implementing Classes:
DatabricksSession
public interface IDatabricksSession
Session interface to represent an open connection to Databricks server.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the session.voidReturns default catalog associated with the sessionReturns the client info propertiesReturns the compression algorithm used on results dataGet the warehouse associated with the session.getConfigValue(String name) Returns the associated connection context for the sessionGets the current catalog from the databaseReturns the client for connecting to Databricks serverReturns the metadata clientReturns default schema associated with the sessionReturns the session configsGet the unique session-Id associated with the session.booleanisOpen()Checks if session is open and valid.voidopen()Opens a new session.voidsetCatalog(String catalog) Sets the default catalogvoidsetClientInfoProperty(String name, String value) Sets the client info propertyvoidvoidSets the default schemavoidsetSessionConfig(String name, String value) Sets the session configtoString()Extracts session to a string
-
Method Details
-
getSessionId
Get the unique session-Id associated with the session.- Returns:
- session-Id
-
getSessionInfo
-
getComputeResource
Get the warehouse associated with the session.- Returns:
- warehouse-Id
- Throws:
DatabricksSQLException
-
isOpen
boolean isOpen()Checks if session is open and valid.- Returns:
- true if session is open
-
open
-
close
-
getDatabricksClient
IDatabricksClient getDatabricksClient()Returns the client for connecting to Databricks server -
getDatabricksMetadataClient
IDatabricksMetadataClient getDatabricksMetadataClient()Returns the metadata client -
getCatalog
String getCatalog()Returns default catalog associated with the session -
getCompressionCodec
CompressionCodec getCompressionCodec()Returns the compression algorithm used on results data -
getSchema
String getSchema()Returns default schema associated with the session -
setCatalog
Sets the default catalog -
setSchema
Sets the default schema -
toString
-
getSessionConfigs
-
setSessionConfig
-
getClientInfoProperties
-
getConfigValue
-
setClientInfoProperty
-
getConnectionContext
IDatabricksConnectionContext getConnectionContext()Returns the associated connection context for the session -
getCurrentCatalog
Gets the current catalog from the database- Throws:
DatabricksSQLException
-
setEmptyMetadataClient
void setEmptyMetadataClient() -
forceClose
void forceClose()
-