Adding variables
Variables in Data Integration enhances the creation of connections, automates procedures, and transfers values between Rivers.
Data Integration variables are denoted by curly brackets { }. This format is used to save data as a variable or to write or reference a variable throughout the Data Integration platform.
- Variables can accommodate up to 20,000 characters.
- Multi-value variables can accommodate as many as 10,000 values.
- Variable names can contain only letters, digits, or underscores; other characters are not permitted.
- Values that exceed these limitations are truncated.
Variable types:
- River Variables
- Environment Variables
River variables
River Variables are used only within a specific River. You can define multiple variables and use them in both Logic and Action Rivers.
Procedure
- Navigate to Data Integration console.
- Create a new Logic or Action River.
- Click the Variables tab in the top right-hand corner.
- Click +Add Variable to add a new River variable.
- To create an Array, use square brackets for the variable value, and then select the Contains Multiple Values checkbox.
- Click Apply Changes.
If you select the Clear Value On Start checkbox, the variable value updates to its original value when a new River is created, regardless of any changes during the River.
Encrypted variables
You can encrypt sensitive values stored in River variables to use in Python steps.
The variable value is encrypted and hidden when you select the Encrypt option. You cannot decrypt the encrypted variables, and new values cannot be saved into encrypted variables using in-line Python code.
To create the same variable with the same name, delete the encrypted variable and create a new one.
After saving the River, you cannot see the value entered in the encrypted variable. Use the un-hide icon to confirm the entered value before saving the River.
- Encrypted Variables are used only within a Logic River and are supported only in Python logic steps.
- To create an Array, use square brackets and save it as the variable value, then select the Contains Multiple Values checkbox.
- The item Clear Value On Start is not supported in Encrypted variables.
Environment variables
You can use Environment variables throughout the platform and configure them by clicking the Variables tab from the Data Integration menu. These variables are used in Rivers only when defined as River variables.
- Environment variable names can contain only letters, digits, or underscores and must start with a letter; other characters are not allowed.
- You can modify values for Environment variables in the Variables tab of the main menu, not within the River.
Procedure
-
Navigate to the Data Integration console.
-
Click the Variables tab from the menu.
-
Click + Add Variable in the top right-hand corner.
-
Add a value to the variable.
- To create an Array, use square brackets to save it as the variable value.
- Use a comma (,) to separate multiple Email addresses or Slack entries.
-
After creating an Environment variable, go to your River and select the Variables tab in the right-hand corner.
-
Set up a new River variable and enter the Environment variable name inside curly brackets to use the value (Test_River_Variable's value will be 10).
-
Click Apply Changes.
To learn more about the techniques of using Variables, refer to Using Source to Target Variables in Logic River and Using Variables in REST Action Rivers topics.
Character limitations for variables
| Variable Limitation | Supported | Details |
|---|---|---|
| Character limit for Variables | Variables can accommodate up to 20,000 characters. The system truncates any values exceeding this limit. | |
| Variables containing multiple values for specific platforms | Yes | Supported: Yes (Google AdWords, BingAds, Facebook Ads - Accounts List Only). Variables can contain multiple values, but this feature applies only to specific platforms such as Google AdWords, Bing Ads, and Facebook Ads, specifically for managing account lists. Multi-value variables can accommodate up to 10,000 values. The system truncates values beyond this limit. |
| Using environment Variables in custom query extraction settings for database migration | Yes | Use Variables in the Custom Query extraction settings for database migration purposes. |
| Using environment Variables in "bucket source" incremental extraction template | Yes | Environment variables are within the "Bucket Source" incremental extraction template for data extraction processes. |
| Passing environment variables into Action River | No | Data Integration does not support passing Environment variables directly into the Action River. |
| Parsing action output into Logic Variables from REST API JSON | No | You cannot parse the output of an action directly into a logic variable from a REST API response in JSON format. |
| Using environment Variables in REST Action API URL | No | Data Integration does not support using Environment variables within the API URL for REST actions. |
| Source-to-Target River Source and Target connection | No | Data Integration does not support using variables in the connections for Source to Target Rivers. |
| Using Variables in REST API request body | No | Currently, variables cannot be used directly in the body of a REST API request. |
| Using Variables in table filter settings | No | The filter within Table Settings does not support using variables and does not accept SQL queries. |