Variables

During execution Agent or Extractor have access to the variables. These variables can be used in expressions. Variables have a scope of visibility.

Global Scope

The global scope variables are accessible in any expression inside application.

  • GLOBAL_DATA_DIR - base location for all output data.
  • GLOBAL_TEMP_DIR - location to store temp files.

Data variables are global scope too and can be used in any expression. They have values depending on the time they were accessed.

  • DD - current day (1, 2, .., 31)
  • MM - current month (01, 02, .., 12)
  • MMMM - current full month name (January, February, .., December)
  • YYYY - current year (2020, ...)
  • mm - current minute (00, 01, 02, .., 59)
  • ss - current second (00, 01, 02, .., 59)

Example: if the current date is 27 Febrary 2020:

${DD}_${MM}_${YYYY}  ->  27_02_2020

Project Scope

The project scopes variables are accessible inside any object of the project.

  • PROJECT_NAME - name of the project.
  • PROJECT_DATA_DIR - directory to store data.
  • PROJECT_FILES_DIR - directory to save downloaded files.
  • PROJECT_IMAGES_DIR - directory to save images.

Agent Scope

Agent scope variables are accessible during agent execution. The most useful usage of this variables is generating files and folders' names.

  • AGENT_NAME - name of the agent.
  • AGENT_START_TIME - agent start time.

All global and project variables are also available in this scope.

Extractor Scope

Extractor scope variables are accessible during extractor execution.

  • EXTRACTOR_NAME - name of the agent.
  • EXTRACTOR_START_TIME - agent start time.

All global and project variables are also available in this scope.

Examples

Suppose we have project with name Amazon that contains agent Agent1 and GLOBAL_DATA_DIR points to ะก:\WebSundew\Data

The expression $/$/$$$_$.csv will generate

C:\WebSundew\Data\Amazon\Agent1_27_02_2020.csv  - for agent that starts 27 December 2020
...
C:\WebSundew\Data\Amazon\Agent1_13_03_2020.csv  - for agent that starts 13 March 2020

will generate string ____