Inserting Variables

From Starfish ETL
Revision as of 18:32, 29 May 2015 by Jkuehlthau (talk | contribs)
Jump to navigation Jump to search

Variables that have been created during an Exec Before/After Operation can be inserted as the end-result value in any kind of Function Field. Place your cursor inside the text box, and click the “Insert Variable” link.

From this list, you can choose a User-Defined variable, any Origin field, any Destination field (that comes before it in the sort order, and that has been assigned a value), or a Special Character. At run-time, the Starfish Engine will “replace” the variable code with the actual value for the current Origin row.


There are 3 system generated variables that can be used throughout Sugar.

Variable Description
[Row Hash Code] Found in the Origin Variable Class, the [Row Hash Code] is added to scripts as @@ORG:#RowHashCode@@.
This is a run-time generated MD5 hash of the entire row's data.
This is useful when you don't have a last modified date in your origin. You can store it and on the next run of the Job, compare the hash to see if the record changed instead of having to compare each individual field.
Job Argument Found in the User-Defined Variable Class, the Job Argument is added to scripts as @@VAR:JobArgument@@.
Last Run Date Found in the User-Defined Variable Class, the Job Argument is added to scripts as @@VAR:LastRunDate@@.
This variable stores the last time a job was run. This is useful for Origin Queries where you want to find all records in the source that were modified after the last time the Job ran.
EX: date_modified >= '@@VAR:LastRunDate@@'