TPT job variables set at runtime


TPT job variables set at runtime


I have a TPT import script which gets data from a sql server database and loads it into a TD table using odbc operator and update operator. It is currently a truncate and load. I'd like to change to incremental loads using create date field from the source system, which would mean that I'd need to compare the create dates of the data in the source with the max create date of the data in the target table and just load the new data i.e. where create date in source is greater than the max create date of the data already in my target table. I can do this with two scripts but I'm wondering if it is possible with a single script, which would require getting the max date from my teradata target table (with a ddl operator) and then passing it to the odbc operator select statement with a concatenation, similar to SelectStmt = 'select * from sourcetable where create_date >  || '''' || @CreateDate || ''''.  Is this possible, or would my only option be to get the max date outside of the import script and assign it to the import script's job variable from command line or from a job variables file?



Tags (2)