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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tmap, lookup, insert new rows

Hello again!
i´ve got the following two tables like:
table1)
Coinfind:
id Issuer Name
360 3 Aedui
366 34 Augustus
128 4 Aedui
... ... ...

table2)
Issuer:
id Name
1 Augustus
2 Tiberius
4 Julius
5 Aedui
.. ...
33 Augustus

table1 mysqlinput --------> tmap --------------> tlogrow (should be: result table, mysqloutput)
^
|
|
table2 (lookup) mysqlinput

so.. the issue ist, that i´ve got some same strings in both tables and also some names in table1, which are not included in table2.
so, first of all i want to do a lookup from table2 to table1 if you can find ids an names of table1 in table2. this i would like to do with string equal.
Issuer and id means the same (FYI).

1) if table1.Name.equals(table2.Name) && table1.Issuer == table2.id >> do nothing
2) if table1.Name.equals(table2.Name) && table1.Issuer != table2.id >> id of table 1 should get that id of table2
3) if you can´t find table1.Name in table2.Name, insert Name of table1 to table2 and set a new id for it.
i had duplicate names in table2 and i solved it with tuniqrow. ok. done.
but now i´m trying to use tmap with little successes, but actually i don´t really know how to use it the right way.
on the left hand, i´ve got my two tables, table1 and table2 and on the right, i´ve got my result table with the same attributes like in table1.
i dragged and dropped the columns of table1 to the result table: id ----> id, Issuer -----> Issuer, etc.
i dragged and dropped the columns of table2 to the result table: id ----> Issuer, Name -----> Name
in the tmapsettings on the right: catch lookup inner join is true, catch output is false.
in the expression field on the right side below the schema type i want to put in the points 1), 2), 3) like above, but i don´t know how to express to set new ids and do nothing.
another point is: should i drag and drop the Issuer and all other columns from table1 to table2?
pls help.. tmap does something, but i need the expressions.
thanks for helping me!
Nadine
Labels (2)
30 Replies
Anonymous
Not applicable
Author

ok sir,
screenshots is here
0683p000009MBxS.png
Anonymous
Not applicable
Author

hi Everybody,
may actual problem is that a have to integrate the data from Quote and opportunity module into an csv file but the data should be last day record can u pls send me the whatever procedure required for it.
in a job i already get the salsforce moules,TMap and TFileOutputDelimiter and i only want the expression required to perform this operation.
Regards,
Sam
0683p000009MCY3.png
Anonymous
Not applicable
Author

you still get the same error? as per your tMap setting and expression provided by me should work for you. 
Anonymous
Not applicable
Author

i want to join three Salesforce Entities and using join operation have to fetch some records but it throw some Types of Exception so What can i do for it?
0683p000009MCVN.png
Anonymous
Not applicable
Author

write below code as it is and check. 
row1.CreatedDate.after(TalendDate.addDate(TalendDate.getCurrentDate(), -1, "DD"))
Anonymous
Not applicable
Author

hello Umesh Sir,
As per your Suggestion i used the Expression in row1 Expression And it Works Now,
My Questions is that if we want to fetch the last day record from one table using its date for eg.CloseDate, but now we have to give another condition i.e. where product="Watch" so what expression it requires and where should be placed
Thank you,
Regards,
Sam
Anonymous
Not applicable
Author

hello EveryBody,
can u please resolved this Error
Starting job Module1 at 17:38 25/08/2014.
connecting to socket on port 3902
connected
Unknown column 'system_pid' in 'field list'Exception in component tMap_1
java.lang.NullPointerException
at salesforce_connection.module1_0_1.Module1.tSalesforceInput_1Process(Module1.java:3724)
at salesforce_connection.module1_0_1.Module1.runJobInTOS(Module1.java:15788)
at salesforce_connection.module1_0_1.Module1.main(Module1.java:15627)
Unknown column 'priority' in 'field list'Unknown column 'system_pid' in 'field list'
disconnected
Job Module1 ended at 18:06 25/08/2014.

0683p000009MCYv.png
Anonymous
Not applicable
Author

it is very helpfull if you upload tMap mapping because, you have Mapped one column named with "system_pid" which is not present in row1, row2, or row3 or you forgot to add row1,2,3 with same column. check and confirm.
Anonymous
Not applicable
Author

hi Umesh,
there is not any type of system_pid coloumn mapping and i checked in my tMap
please suggest any other idea
thanks.
0683p000009MCav.png
Anonymous
Not applicable
Author

i am suspecting it must be in filter data section please check there.