@Override
    public int insertDataToTable(ResultSet resultSet, int taskId) throws Exception {

        // Temporal file name
        String randomFileUrl = options.getSinkConnect() + ".repdb." + (new Random().nextInt(9000) + 1000);
        LOG.info("Temporal file path: {}",randomFileUrl);

        // Save the path of temp file
        FileManager.setTempFilePath(taskId,randomFileUrl);

        // Create the OutputStream
        File tempFile = getFileFromPathString(randomFileUrl);
        OutputStream out = new FileOutputStream(tempFile);

        // Write data to the specific file manager
        int processedRows = this.fileManager.writeData(out, resultSet, taskId, tempFile);

        out.close();
        return processedRows;
    }
Constructs the SqlManager.

@param opts the ReplicaDB ToolOptions describing the user's requested action.
src/main/java/org/replicadb/manager/LocalFileManager.java