cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
722
Views
5
Helpful
2
Replies

File Dependency Question..

Brian Chen
Level 1
Level 1

I was wondering when generating a new file dependency can I do embedded unix commands?

For example, I wanted to check the exisitance of a file but with a date structure:

/home/test/`date +%Y-\%m-\%d`/testfolder/testfile.csv

Essentially, that gets todays date in a specific format for a directory name. Its the same as doing an "ls" on that path and seeing if it exists, except the shell will interpret the `date +%Y-\%m-\%d` portion and return the date in that format.

Is this possible within the context of a file dependency?

Thanks

2 Replies 2

Tracy Donmoyer
Level 1
Level 1

You can use the Tidal System Date variable to accomplish this.  Click the Variables button, System Variables, System Date, Date Format.  This will insert the system date when Tidal starts the new scheduled day.  This is probably at midnight, but if you have an offset schedule this could be at another time.  The important thing to remember is the date is when the current day's schedule goes live, not the date when the job's dependencies are met.

You can also use the System Variable, Production Date, Date Format if you use an offset schedule.  This will use the Production Date associated with the offset calendar.  For example, if you have offset your schedule to start at 8am and the current date at 8am is 10/28, then the production date is 10/28 from 8am today until 7:59:59am tomorrow.

Thanks.

Thanks Tracy, That worked perfectly!