Interface FileTransferAPI

All Known Implementing Classes:
DatabendConnection

public interface FileTransferAPI
  • Method Summary

    Modifier and Type
    Method
    Description
    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 a file to the databend internal stage, the data would be uploaded as one file with no split.
  • Method Details

    • uploadStream

      void uploadStream(String stageName, String destPrefix, InputStream inputStream, String destFileName, boolean compressData) throws SQLException
      Upload a file 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.
      Parameters:
      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
      Throws:
      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.
      Parameters:
      stageName - the stage which contains the file
      sourceFileName - the file name in the stage
      decompress - whether to decompress the data
      Returns:
      the input stream of the file
      Throws:
      SQLException