EA Connect - Variable Documentation
This documentation provides an overview of the Variables feature in EA Connect. This option allows users to use variables inside task attributes, which are replaced with variable values during task execution.
Type of Variables
There are two type of variables in EAConnect.
1. User-Created Variables
2. System Variables
These are the variables which are created by users and can be found in “Variables” section under “Build” menu.
To create a new variable, click on the "Create New" button at the top right.
Provide a name and description for the variable. Select the input type for the variable (Note: Variable names must start with $var
). You can also provide a default value for the variables, which will be used if the value is not provided or if the flow is executed through a schedule.
Variables can be used inside task attributes for example in sql statements where you might want to provide a value during flow execution.
Variables can be used inside task attributes, for example, in SQL statements where you may want to provide a value during flow execution.
If there are variables used inside a task in a flow, a popup will appear when you click on the execute button. You can provide the filter values, which will replace the actual SQL text during execution. For example, in the above SQL, {{$varDate}}
will be replaced by the provided value.
System variables are date variables that are generated at runtime and are evaluated based on parameters like current time, timezone, offset format, etc. Refer to the table at the end of this page for more information on available variables and how they are evaluated.
System Variables can be used inside task attributes, for example, in SQL statements where you may want to use them.
Unlike user-created variables, there will be no popup for system variables, and they will be evaluated internally at execution time. For example, {{$svarCurrentDate}}
evaluates to the current date in dd/mm/yyyy format. You can change the format or offset the date. Refer to the table below for additional details.
Variable Name | Description | Usage | Example | |
---|---|---|---|---|
svarCurrentDate | Evaluates to current date | {{$svarCurrentDate}} | 19/05/2023 | |
svarFirstDayOfCurrentMonth | Evaluates to first day of current month | {{$svarFirstDayOfCurrentMonth}} | 01/05/2023 | |
svarLastDayOfCurrentMonth | Evaluates to last day current month | {{$svarLastDayOfCurrentMonth}} | 31/05/2023 | |
svarFirstDayOfCurrentWeek | Evaluates to first day of current week | {{$svarFirstDayOfCurrentWeek}} | 14/05/2023 | |
svarLastDayOfCurrentWeek | Evaluates to last day of current week | {{$svarLastDayOfCurrentWeek}} | 20/05/2023 | |
svarFirstDayOfCurrentYear | Evaluates to first day of current year | {{$svarFirstDayOfCurrentYear}} | 01/01/2023 | |
svarLastDayOfCurrentYear | Evaluates to last day of current week | {{$svarLastDayOfCurrentYear}} | 31/12/2023 | |
svarFirstDayOfLastMonth | Evaluates to first day of last month | {{$svarFirstDayOfLastMonth}} | 01/04/2023 | |
svarLastDayOfLastMonth | Evaluates to last day of last month | {{$svarLastDayOfLastMonth}} | 30/04/2023 | |
svarFirstDayOfLastWeek | Evaluates to first day of last week | {{$svarFirstDayOfLastWeek}} | 07/05/2023 | |
svarLastDayOfLastWeek | Evaluates to last day of last week | {{$svarLastDayOfLastWeek}} | 13/05/2023 | |
svarFirstDayOfLastYear | Evaluates to first day of last year | {{$svarFirstDayOfLastYear}} | 01/01/2022 | |
svarLastDayOfLastYear | Evaluates to last day of last year | {{$svarLastDayOfLastYear}} | 31/12/2022 | |
svarTimestamp | Evaluates to utc timestamp | {{$svarTimestamp}} | 20230606034801 | |
Note: Additional parameters can be passed to variabes as comma separated arguments in order timezone,offsetType,offsetValue and format. All of these are optional and can be left empty as well. Example: Same date last year => {{$svarCurrentDate,,year,-1}} |
||||
Offset Types: string [day,week,month,year] Offset Value: number (positive or negative integer) ex: 1, -1 | ||||
Format: string (valid date format) Example: Month end date of 2 month prior from Last month, US Central timezone, format MM/DD/YYYY: {{$svarLastDayOfLastMonth,US/Central,month,-2,MM/DD/YYYY}} |
||||
Africa/Abidjan
Africa/Lagos
Africa/Maputo
Africa/Nairobi
Africa/Cairo
Africa/Casablanca
Pacific/Samoa
US/Hawaii
US/Alaska
US/Pacific
US/Mountain
US/Central
America/Mexico_City
US/Eastern
America/Bogota
America/Puerto_Rico
America/Halifax
America/Buenos_Aires
Canada/Newfoundland
Brazil/DeNoronha
Atlantic/Cape_Verde
Europe/London
Europe/Amsterdam
Europe/Athens
Europe/Moscow
Asia/Tehran
Asia/Dubai
Asia/Kabul
Asia/Karachi
Asia/Kolkata
Asia/Dhaka
Asia/Yangon
Asia/Jakarta
Asia/Hong_Kong
Asia/Tokyo
Australia/North
Australia/South
Australia/Brisbane
Australia/Sydney
Asia/Sakhalin
Pacific/Norfolk
Pacific/Auckland
Pacific/Kanton
Pacific/Kiritimati