Skip to Content
Nov 24, 2020 at 05:05 PM

Check for existence of Substitution Parameter in Data Services


How can I check for the existence of a substitution parameter in a script? No matter what I try, I always get the error "Substitution Parameter [$my_variable] is not defined". I want to define a substitution parameter in my production repo, but not lower lane repos. Then, I want to check for its existence, so that if I am in a lower lane, I do not execute a portion of a script. In python, this is accomplished with as seen below. Is there something equivalent in Data Services script?

if 'myVar' in globals():

# myVar exists.