talend - Put File Mask on tFileList Component dynamically -


i wondering if let me know how can set file mask tfilelist component in talend recognize date automatically , download data desired date? have tried approach , faced errors "the method add (string) in type list <string> not applicable arguments (date)"

there 2 ways of doing it.

  1. create context variable , use variable in file mask.
  2. directly use talenddate.getdate() or other date function in file mask.

see both of them in component

1st approach,

  • create context variable named datefilter string type.
  • assign value context.datefilter=talenddate.getdate("yyyy-mm-dd");
  • suppose have file name "abc_2015-06-19.txt" then
  • in tfilelist file mask use variable follows.

    "abc_"+context.datefilter+".*"

2nd approach

  • in tfilelist file mask use date function follows.

    "abc_"+talenddate.getdate("yyyy-mm-dd")+".*"

these 2 best way, can make changes in file mask per file names.


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -