You can include parameters when specifying data for export in workflows.

You can see examples of various connector configurations in our open GitHub repository. A detailed workflow example using result output using FTP can be found at GitHub repository.

Workflow Parameters for Data Export

The parameters that you use in Workflow are determined by the result export type.

Generic code example within a workflow definition.
timezone: UTC
_export:  
  td:
      database: sample_datasets

+td-result-into-target:  
  td>: queries/sample.sql  
  result_connection: your_connections_name  
  result_settings:    
    parameter1: value1
    parameter2: value2    ....


FTP Result Output using result_settings Example

In Treasure Workflow, specifying result output through FTP looks like this:

timezone: UTC
_export:
  td:
      database: sample_datasets
  
+td-result-via-ftp:  
  td>: queries/sample.sql  
  result_connection: ftp-out
    result_settings:
        path_prefix: /path/to/file
        sequence_format: ""
        file_ext: csv
        compression: None
        header_line: None
        delimiter: ","
        null_string: ""
        newline: CRLF

Parameters that you can apply to your result output through FTP are:

path_prefix

Prefix of output paths (string, required)

file_ext

default: csv (string, (csv or tsv))

sequence_format

Format for sequence part of output files (string, default: ".%03d.%02d")

compression

default None (string(None|gz |bzip2))

header_line

default true (boolean(true|false))

null_string

default "" (string(""|"\N"|NULL|null))

delimiter

default "," (string(","|"\t"|"tab"|"|"))

newline

default CRLF (string(CRLF|CR|LF))




  • No labels