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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Tech8
Contributor III
Contributor III

Job optimization

In terms of optimization what is better? Use a global variable at the start of the job and then call it in the tMaps or use several querys (tDBInput) to get the data to this tMaps. I have to use it like 8 tDBinput components only to get the same data (is a small query with 2 columns) in different parts of my job.

 

I supose global variable is better option but i want to know if i will some problems when calling a global var inside the tMap.

 

Thanks in advance

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi,

 

    If it is a small dataset and you are using it multiple times, you can store it in global variable or hash maps.

 

    In your use case, your current approach looks fine rather than querying database multiple times (since each query of DB has an associated resource cost).

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

3 Replies
Anonymous
Not applicable

Hi,

 

    If it is a small dataset and you are using it multiple times, you can store it in global variable or hash maps.

 

    In your use case, your current approach looks fine rather than querying database multiple times (since each query of DB has an associated resource cost).

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

DataTeam1
Creator
Creator

I think you can use tHash... compnents (tHashInput

This compnents are for creating temporary table within a job which you can use many times.

 

You can get data from source (db, file etc) and load it into hash(temporary) table and use it many times instead of loading data many times from source.

 

To see it in your palete you have to unhide them in: File => Edit project properties  => Designer => Palete setings => Technical

Tech8
Contributor III
Contributor III
Author

I tried both solutions and work fine for me and even looks like having several tHash components dont affect the performance of the job. 

 

I will take the global var as the solution because im looking for use less components but as i said both solutions work.

 

Thanks so much