public interface SnowflakeConnection
| Modifier and Type | Method and Description |
|---|---|
ResultSet |
createResultSet(String queryID)
Create a new instance of a ResultSet object based off query ID.
|
InputStream |
downloadStream(String stageName,
String sourceFileName,
boolean decompress)
Download file from the given stage and return an input stream
|
SFConnectionHandler |
getHandler()
Returns the SnowflakeConnectionImpl from the connection object.
|
String |
getSessionID()
Return unique session ID from current session generated by making connection
|
void |
uploadStream(String stageName,
String destPrefix,
InputStream inputStream,
String destFileName,
boolean compressData)
Method to compress data from a stream and upload it at a stage location.
|
void uploadStream(String stageName, String destPrefix, InputStream inputStream, String destFileName, boolean compressData) throws SQLException
caller is responsible for releasing the inputStream after the method is called.
stageName - stage name: e.g. ~ or table name or stage namedestPrefix - path prefix under which the data should be uploaded on the stageinputStream - input stream from which the data will be uploadeddestFileName - destination file name to usecompressData - compress data or not before uploading streamSQLException - failed to compress and put data from a stream at stageInputStream downloadStream(String stageName, String sourceFileName, boolean decompress) throws SQLException
stageName - stage namesourceFileName - file path in stagedecompress - true if file compressedSnowflakeSQLException - if any SQL error occurs.SQLExceptionString getSessionID() throws SQLException
SQLExceptionResultSet createResultSet(String queryID) throws SQLException
queryID - SQLExceptionSFConnectionHandler getHandler()
Copyright © 2022. All rights reserved.