Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to compare the input file first row value with the all rows in the second input file column in talend
Hi Veeranjaneyulu,
Its working fine.Thank you but how would i catch the input date that does not matched in the datepattern file.Not matched with date patterns in file .i would like to catch that date in outputfile.Any suggestion on this.
i tried in this way but not bale to catch the not matched date date
Any idea..?
If you want the non-matching date elements as well, just remove the filter condition in the 2nd tMap which @vboppudi has provided then all the records will be available with boolean flag (true/false). You can easily identify the non-matched date patterns.
Thanks,
Hameed.
Thank you for your reply. but I am not clear Mr.skh can u please eloborate what you said.Actually the job i did in the above screen shot is i will check the input date with all date patterns in the date pattern file(look up file) if pattern found then the date is parsed to one defined format other wise null
i am outputting the data which the Var.var1 is not null means only parsed dates only i output to the logrow. but i want the dates that are not matched with any of the date_pattern in the file.actually as per my job.. what the job is doing if input sting date pattern is matched wiht any of the predefinrd pattens the parsing the string to date format. if false it will out put all not matched dates.means for every input string compared date patterns not matched ...all rows willl be given as ouput .but i want the dates which or not that patter found in the file.
can i get any solution on this.
Hi,
You wants to separate both valid and in-valid dates right ..? Just you need to add a filter condition in the tMap_2 and separate both the flows to different output files (here I diverted both of them in tLogRow Components you can replace them with suitable output components.)
Thanks,
Hameed
Hi,
As we know that bolean stands for either true or false. So if we keep this bolean column in the tMap filter condition it will filter the records based on the true condition.
a1.Flag - (as it defined as bolean) so all the valid records will route through this pipeline.
!a1.Flag- Unvalid i.e, which doesn't match the condition will route through this flow.
Hope this helped you.
Thanks,
Hameed.
sry sir this is not working.sir this will be printing the all dates as the input date from one file compares the all predefined patterns if not matching printing that date that many times.the inputdate is iterating through all patterns so if first pattern not match date is printins as not matched second is compared matched it will not.
but my scenarion is different if the inpute date is not matched with any of the predefined patterns in the other file(loopup file).the date should display as not parsed.
Hi Hameed sir
I checked the screen shots u shared but that is getting 73 rows as output for not matching .but we have only 13 rows input
we have 13 input string if any of that string does not have pattern matched in the predefined date pattern file that date should display in another outputfile..so that we can come to know which dates are not been parsed to one defined format.
Am new to this talend am learning now .so that the reason am not able to solving it quickly.
Hello sir ,
Can you please tell how to get the dates which are not parsed. ie the input string daes not have that predefined pattern in the date_pattern file .the date should be output as rejected.
possible please share the job n screen shots....Very much thank ful the one to which you replied..