Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
Format : stage_name:key 
 
Example for Scoping:
 
Key : table-name, value : employees // non-scoped key and value
Key : Table.:table-name, value : employee_sql // scoped key and value
 
 
//Priority will be provided for scoped key with stage-name if that key is present, else non-scoped key will be used if that is present.
String substituteAndGet(String macro, String stageName) {
	if (macroContext.containsKey("<stagename>.<macro>")) {
		return substituteMacro(macroContext.get(<stagename>.<macro>))
	} else if (macroContext.containsKey(<macro>)) {
		return substituteMacro(macroContext.get(<macro>));
	} else {
		throw MacroNotFoundException("Expected macro %s is not found", <macro>);
	}
}

...