You can create parameters for use throughout the entire workspace or project in the form of Environment Parameters.
An Environment parameter is a variable of String type defined by an administrator that any user of the environment can reference in their flows and flow-related objects.
Environment parameters are available to all users and can be reused across different datasets and flows. You can use them, for example, to parameterize bucket names
NOTE: You must be a workspace administrator or project owner to create environment parameters.
Create Environment Parameters
Environment Parameters page exists in the Admin Console that you can access by clicking on your initials in the left navigation bar.
2. In the Admin console, find and click on the Environment parameters option to open the Environment parameters page
3. Click on Create to create a new Environment parameter with a name and a default value attached to it.
4. Once you click Save, you will see the Environment parameter created in the list.
Notice that all environment parameter names are automatically prepended with
env.. This is to distinguish them from other parameters when you use them.
Also, you can click on the More (...) menu to be able to Edit the Value or Delete the parameter.
After you have created an environment parameter, you cannot change the name. You must create a new environment parameter.
Using Environment Parameters
You can use the environment parameter created in your flows to parameterize project and workflow level things like project name, bucket names, etc.
Create an Environment parameter to parameterize your bucket name using the above-mentioned steps.
Open the Flow where you would like to use this Environment parameter Or Create a new Flow
Click on Add Dataset to this flow and go to Import datasets
Navigate to the folder or file you would like to import and click on Parameterize against the file/folder name
In the Create Dataset with Parameters screen, highlight the bucket name or a part of the bucket name that you would like to parameterize and click on the <> icon that appears.
This opens the Add Variable dialog
In the Name field, you can enter a name for the variable. If you would like to use an existing Environment parameter, you can type in env here which is the prefix for all Environment parameters. They show up in a list that you can select from.
Select env.bucket_name that we created earlier. Provide the Default value.
Click Save and Add to Flow
You can now continue to use this parameterized dataset in your flow.
When you run the flow, you will be shown the name and the default value of the variable in the Variables section on the Run Job screen.
You can edit the value and thus proceed to pick the dataset from different buckets at run time.
Environment parameters can be referenced in the following locations:
Parameterized datasets. See Create Dataset with Parameters.
Datasets created with SQL. See Create Dataset with SQL.
Output paths. See Create Outputs.
Tip: When specifying a variable, enter
$env to see the list of available environment parameters.
Export and Import
Environment parameters can be exported from one project or workspace and imported into another so that these references are consistent across the enterprise.
You can export the environment parameters from your project or workspace by using the Export option on the Environment parameters page.
In the Environment Parameters page, select More menu > Export.
The ZIP file is downloaded to your local desktop.
NOTE: All environment parameters are exported at the same time into a ZIP file. Do not modify this file outside of the Trifacta application.
If you have exported a set of Environment parameters, you can import them into another workspace or project.
In the Environment Parameters page, select More menu > Import.
Select or drag-and-drop the ZIP file. Click Import.
The Import environment parameters dialog is displayed:
3. Review each environment variable and its assigned value from the import package. Modify values as needed.
The environment parameters and your modifications to them are imported.