程序包 com.databend.jdbc

# 接口 FileTransferAPI

所有已知实现类:
  `DatabendConnection`

public interface FileTransferAPI

## 方法概要

修饰符和类型
方法
说明
`void`
`copyIntoTable(String database, String tableName, DatabendCopyParams params)`
Copy into the target table from files on the internal stage Documentation: https://databend.rs/doc/sql-commands/dml/dml-copy-into-table
`InputStream`
`downloadStream(String stageName, String sourceFileName, boolean decompress)`
Download a file from the databend internal stage, the data would be downloaded as one file with no split.
`void`
`uploadStream(String stageName, String destPrefix, InputStream inputStream, String destFileName, boolean compressData)`
Upload inputStream to the databend internal stage, the data would be uploaded as one file with no split.

## 方法详细资料

### uploadStream

void uploadStream(String stageName, String destPrefix, InputStream inputStream, String destFileName, boolean compressData) throws SQLException
Upload inputStream to the databend internal stage, the data would be uploaded as one file with no split. Caller should close the input stream after the upload is done.

参数:
  `stageName` - the stage which receive uploaded file
  `destPrefix` - the prefix of the file name in the stage
  `inputStream` - the input stream of the file
  `destFileName` - the destination file name in the stage
  `compressData` - whether to compress the data
抛出:
  `SQLException` - failed to upload input stream

### downloadStream

InputStream downloadStream(String stageName, String sourceFileName, boolean decompress) throws SQLException
Download a file from the databend internal stage, the data would be downloaded as one file with no split.

参数:
  `stageName` - the stage which contains the file
  `sourceFileName` - the file name in the stage
  `decompress` - whether to decompress the data
返回:
  the input stream of the file
抛出:
  `SQLException`

### copyIntoTable

void copyIntoTable(String database, String tableName, DatabendCopyParams params) throws SQLException
Copy into the target table from files on the internal stage Documentation: https://databend.rs/doc/sql-commands/dml/dml-copy-into-table

参数:
  `database` - the target table's database
  `tableName` - the target table name
  `params` - copy options and file options
抛出:
  `SQLException`