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

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tMap lookup issue

Tables : 

Category_tbl : categoryid(Auto Generated), CategoryName, CategoryCode

Product_tbl :  productid(Auto Generated),categoryid,productname

 

Category XLS : CategoryCode,CategoryName

Product XLS : Product Name,CategoryCode

 

My Process 

Read Catgegory XLS -> Write Category TBL -> Read Product XLS -> JOIN tables using tMap(CategoryCode)  -> Get categoryId from Lookup tbl -> Write Product with CategoryId(Foreign Key)

 

I Can't get the CategoryId from Lookup db connection(category tbl) component

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

The categoryid is generated by database rather than coming from Category XLS, so you need to query the categoryid after you insert the category information into database, try to change the job to
Read Catgegory XLS -> Write Category TBL
|onsubjobok
Read Product XLS -> JOIN tables using tMap(CategoryCode) -> lookup (select categoryid, CategoryCode from lookup_table)


View solution in original post

4 Replies
Anonymous
Not applicable
Author

Hi
Is it an inner join or left outer join on tMap? Can't get the categoryid even though the same CategoryCode exists in both tables? It might be an execution order issue, can you share a screenshot of the job?

Regards
Shong

Anonymous
Not applicable
Author

The categoryid is generated by database rather than coming from Category XLS, so you need to query the categoryid after you insert the category information into database, try to change the job to
Read Catgegory XLS -> Write Category TBL
|onsubjobok
Read Product XLS -> JOIN tables using tMap(CategoryCode) -> lookup (select categoryid, CategoryCode from lookup_table)


Anonymous
Not applicable
Author

Hi shong, Thanks for your promptly response,

Write Category TBL is  tDBOutput(mySQL) component , Can't get onsubjobok event

Anonymous
Not applicable
Author

Hi shong, Thanks for your support, It works now.