Workspace variables
Workspace variables in Meiro Integration is a feature which allows you to hold common information for all configurations, such as the name of the AWS S3 bucket, host and database name, in a workspace in the form of a variable(s).
This means that if you change the value of a specific variable in your workspace, it will be updated across all running configurations in this workspace in which this variable was used.
This feature can be particularly useful when you first want to set up and test the configurations on your test data sources and/or other data sources that you want to export your data to, before switching to the production environment.
Adding variables
To add a variable in a workspace go to the Variables box and click on the Manage Variables button.
Fill in the name of the variable, its value and save the results. Add as many variables as you need.
Copy variable
If needed, the variable can be copied to a clipboard by clicking on the copy icon.
Using variables in configurations
When you want to use the variable inside any configuration, you need to fill in the desired field with the variable name in double curly braces: {{my_variable}}
.
As shown in the screenshots below, the AWS S3 connector will save the downloaded data to the in/files/test
folder as the value of my_variable
(as defined in the field Save As field in the screenshot below) is set to test
. In AWS S3 connector Save As defines a folder where you want to save your data.
Keeping credentials in variables
You can store not only publicly available data such as file and folder names in the variables bucket but also secure sensitive data such as passwords, secret API keys, etc.
To ensure that the variable value is encrypted, use the #
prefix with the name of the variable: #mypassword
. After saving the variables, the value of the variable will be encoded and accessible by configurations.
If you use the variable in fields that are already encoded by default (e.g. the Secret Access Key in the AWS S3 connector component in the above screenshot), the name of the variable (key name) itself will not be encoded by Meiro Integrations.
Using variables in JSON configurations
You can use variables not only in form fields but also in the JSON configuration.
For example, if you need to send a username and password to generate a token in the REST API processor component, take the name of the variable with curly brackets in double-quotes.
Use "{{#username}}"
and "{{#password}}"
in the configuration:
This technique allows you to inject variables values inside any JSON configuration. If you don’t want the value of the variable to be hashed, simply don’t use the #
symbol at the beginning of the name of a variable.