4.5. Variable Expansion

4.5. Variable Expansion

Pegasus Planner supports notion of variable expansions in the DAX
and the catalog files along the same lines as bash variable expansion
works. This is often useful, when you want paths in your catalogs or
profile values in the DAX to be picked up from the environment. An error
is thrown if a variable cannot be expanded.

To specify a variable that needs to be expanded, the syntax is
${VARIABLE_NAME} , similar to BASH variable expansion. An important thing
to note is that the variable names need to be enclosed in curly braces.
For example

${FOO} - will be expanded by Pegasus
$FOO - will NOT be expanded by Pegasus.

Also variable names are case sensitive.

Some examples of variable expansion are illustrated below:

DAX

A job in the DAX file needs to have a globus profile key project
associated and the value has to be picked up (per user) from user
environment.

<profile namespace="globus" key="project">${PROJECT}</profile>

Site Catalog

In the site catalog, the site catalog entries are templated,
where paths are resolved on the basis of values of environment
variables. For example, below is a templated entry for a local site
where $PWD is the working directory from where pegasus-plan is
invoked.

Note

Variable expansion is only supported for File based Replica
Catalog, not Regex or other file based formats.

Transformation Catalog

Similarly paths in the transformation catalog or profile values
can be picked up from the environment i.e environment variables OS ,
ARCH and PROJECT are defined in user environment when launching
pegasus-plan.

The Pegasus project is supported by the National Science Foundation under the OAC SI2-SSI program, grant #1664162. Pegasus also receives support from the Department of Energy, the National Institutes of Health, Defense Advanced Research Projects Agency, and the USC Information Sciences Institute.