Hi, I have to put the following condition in my Tmap ie
when name='ABC' and year=2010 to 2017, then only give o/p. name is coming from Datasource1 and year from Datasource2
so in Tmap, I created this expression filter and it doesn't work.
(Datasource1.name=="ABC" && (Datasource2.year >=2010 && Datasource2.year <=2017))
What is wrong with it..? Thanks in advance for help!
I took 2 excel files and join with tMap using your filter. Its working perfectly there.
File 1 Schema: ID (int), NAME (string)
File 2 Schema: ID (int), Year (int)
File1.NAME.equals("ABC") && (File2.YEAR >=2010 && File2.YEAR <=2018)
--> '==' operator compares two object references to see whether they refer to the same instance.
--> equals() method compares the characters inside a String object i.e. compare the data.
Hope it helps.
No need to use the logic in VAR area. You need to put the filter in tMap Output table area.
Please see the attachment for more details.
Let me know if it helps.
I don't put the expression in the VAR area. I put it in expression builder area only. Somehow it threw error. Is this expression working for u..?
Yes, its working in my case.
After applying this code APPLY OK, just run the job. It will give desired result.
There is possibility that your system has more than 1 java versions, so you need to uninstall them, then reinstall which one you needed.
Introduction to Talend Open Studio for Data Integration.
Practical steps to developing your data integration strategy.
Create systems and workflow to manage clean data ingestion and data transformation.