Hi,
I want to join 2 tables and filter the data according to some rules.
I already have the sql statement for this operation from my colleague.
So, is there anyway I can directly use this sql statement to join and filter the data from these 2 tables?
or do I have to use tMap to put in the conditions?
Please reply ASAP..
Thank You.
Kyaw Lwin Phyo
Hi
You can use txxxRow such as tMysqlRow the execute the sql statement if the sql statement have already achieved the request join two table and filter data. Or use a tMap to do the join and add filter condition to filter the data.
Best regards
Shong
Hi Shong,
Thanks for the fast response...
What kinda txxxRow should I use?
My input is from oracle and output is to MySQL.
Thanks again...
Kyaw Lwin Phyo
You can put any select statement you want in your input component (join, group by, where, order by, nested) as long as the schema you define is consistent with the result of the query.
Hello...
I have put a query in tMySqlInput component and direct this component to tMap.
but in tMap, the result from my query is not there but the standard columns from the table.
My table has Year, Week, Month, Start Date, End Date columns
and my query returns the concated value of YearWeek-Start DateEnd Date as period.
However, in tMap, I'm only seeing the columns but not my returned value.
I've tried with tMySqlRow too.
I need this period variable to validate the data from another table which I need to join.
Any Suggestion????
Thank you.
Kyaw Lwin Phyo
I have uploaded the screenshots
First one is how I'm trying to do.
I have one table that has data and another weeks table which has the dates
I have to filter the data from first table with the dates from weeks table.
Second one is my query.
In fact the full query is like
getting the period value below to check the local_date of the table.
"SELECT concat(w.year, w.week, date_format(w.`Start Date`, '%d-%b-%Y'), date_format(w.`End Date`, '%d-%b-%Y')) period
FROM calendar.weeks w
WHERE date_sub(curdate(), interval 7 day) >= w.`Start Date`
AND date_sub(curdate(), interval 7 day) <= w.`End Date`; => period = 20113604-Sep-201110-Sep-2011"
Third one is how I'm getting in tMap.
Thank You.....
(if images are not available please also tell me how to upload images..
I've tried from the link
https://community.talend.com/t5/Design-and-Development/how-to-upload-an-image/td-p/60550)