docs: private void uploadStreamInternal(String stageName,
                                      String destPrefix,
                                      InputStream inputStream,
                                      String destFileName,
                                      boolean compressData)
    throws SQLException
    {
      logger.debug("upload data from stream: stageName={}" +
                   ", destPrefix={}, destFileName={}",
                   stageName, destPrefix, destFileName);
  
      if (stageName == null)
      {
        throw new SnowflakeSQLException(
            SqlState.INTERNAL_ERROR,
            ErrorCode.INTERNAL_ERROR.getMessageCode(),
            "stage name is null");
      }
  
      if (destFileName == null)
      {
        throw new SnowflakeSQLException(
            SqlState.INTERNAL_ERROR,
            ErrorCode.INTERNAL_ERROR.getMessageCode(),
            "stage name is null");
      }
  
      SnowflakeStatementV1 stmt = this.createStatement().unwrap(SnowflakeStatementV1.class);
  
      StringBuilder putCommand = new StringBuilder();
  
      // use a placeholder for source file
      putCommand.append("put file:///tmp/placeholder ");
  
      // add stage name
      if (!stageName.startsWith("@"))
      {
        putCommand.append("@");
      }
      putCommand.append(stageName);
  
      // add dest prefix
      if (destPrefix != null)
      {
        if (!destPrefix.startsWith("/"))
        {
          putCommand.append("/");
        }
        putCommand.append(destPrefix);
      }
  
      putCommand.append(" overwrite=true");
  
      SnowflakeFileTransferAgent transferAgent = null;
      transferAgent = new SnowflakeFileTransferAgent(putCommand.toString(),
                                                     sfSession, stmt.getSfStatement());
  
      transferAgent.setSourceStream(inputStream);
      transferAgent.setDestFileNameForStreamSource(destFileName);
      transferAgent.setCompressSourceFromStream(compressData);
      transferAgent.execute();
  
      stmt.close();
    }