Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to pass content of thashmap to java routien in tjava component

Hi,
I am having the problem with thashmap component.
here i will have one holiday list table which will have list of holidays.I ahve one table which will have start date and end date my requiremnet is to calculate the working days(excluding sun,sat,holidays) between given start date and end date.

Holiday list table
date
-----
2/2/2013
3/2/2013
3/15/2013
my table will have
start date end date
----------- -----------
1/2/2013 2/31/2013
3/1/2013 3/31/2013
my output should be
start date end date holiday count
----------- ----------- ---------
1/2/2013 2/31/2013 1
3/1/2013 3/31/2013 2

for this thing i used one thash map to store the holiday list and created one userdefined routien but not able to pass the content of the thashmap to routien to check whether the date between start date and date is there in the holiday list.Can you please help in this.

Thanks,
Ganga
Labels (2)
4 Replies
Anonymous
Not applicable
Author

Hi,
want to run multiple files with same file mask.
situations is like this I have file with same name in a folder batch needs to iterate on each file and run as many times as files are present.
Please suggest a way out.
Anonymous
Not applicable
Author

tFileList->iterate-->tlogrow
Use file mask as "*".
Whether the metadata is same for all the files?
Pl check following
https://help.talend.com/search/all?query=tFileList&content-lang=en
Vaibhav
Anonymous
Not applicable
Author

I would either use;
tHashMap->tFlowToIterate->tJava, access the info in the tHashMap using the global map and pass it to you routine, ((String)globalMap.get("rowfromhashmap.date_info")).
or
tHashMap->tJavaRow and access it directly using the input_row, input_row.date_info and pass.
Hope this helps.