Data Import File Path %hour-1%
Hello Team,
As setting cron job in a data import I always use the %hour% in pointing to a right folder for import.
However, sometimes, if I'd like to point Datameer to import an hour before the current %hour%. Is it possible?
See below snippet.
I actually wanted to set the path to be /hosts/2021/04/30/06/*txt
May I know if that is possible
Thanks,
Anson
-
Hello Anson.
At the moment, file and path name patterns do not allow to use of %pattern-N% expressions. That's why %hour-1% or %hour%-1 won't be recognized and calculated.
However, you could reconfigure the pattern using the File Name and Path Filter (by Date and Time) option.
- In an ImportJob configuration put the %hour% pattern into a file/path name. Right away it should return the current hour value based on the Datameer application server time-zone.
- Go to the File Name and Path Filter (by Date and Time) section and choose Filter by Dynamic dates.
- Put NOW()-1h as both Start and End expression. This should changes the %hour% pattern from the current hour to the current hour -1.
Example
- At the moment its 11:25 at the Datameer application server.
- The %hour% pattern returns 11 as expected.
- However, as soon as I put NOW()-1h to the Dynamic dates filter it changes to 10.
I hope this helps you to import the required portion of data.
Please sign in to leave a comment.
Comments
3 comments