Use a Naming Convention for Variables¶
This page provides guidance on user-provided names of local and global variables.
Types of Variables¶
Harmony has four types of variables:
- Project Variables: Defined in the Cloud Studio UI and available across a project. Updateable through the Management Console.
- Jitterbit Variables: Predefined in Harmony or defined in a Private Agent's configuration file. Available across a project.
As the scope of a local variable is limited to a single script, a naming convention for them can be very simple, such as all-lowercase letters or an initial word, such as
myVariable. Periods are not allowed in local variables.
Global variables, as their scope is larger (a global variable is available to be referenced in the same or downstream operations and scripts within an operation chain), should use a consistent naming convention to avoid confusion. For example, using multiple components for a variable name, separated by underscores, you could follow a pattern such as this:
|A short abbreviation identifying the variable type, such as
pv (project variable),
gv (global variable),
io (endpoint source/target name),
dict (dictionary), etc.
|A logical name for the variable, such as
ids, etc. Additional underscores can be used as needed.
Combining these components, these are possible variable names:
Since variables are sorted alphabetically in various places throughout the UI, organizing them hierarchically will assist with managing and using variables.
Whatever convention you choose to use, we recommend codifying and documenting it so that all team members can consistently use it in all projects.