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

Inserting the manually static values in tHashOutput

I have 4 values in context variable named as
1. Property
2. OCC
3. Agent
4. Reservation

And I am fetching multiple dates from tDBInput

Suppose we get 1 dates 20180710

I need to insert

Property_20180710
Agent_20180710
OCC_20180710
Reservation_20180710

In tHashOutput


How can I achieve this??
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi,

      It will not be complex if you take the base date also in the output flow as reference (screenshot below).

       Please note that I have taken the filedate as string from source itself (or you can convert in between stage). So concatenation will become easy.

 

      After that its pretty straightforward even if you are having multiple date records from source. 

      

       I hope this will resolve your issue.

 

Warm Regards,

 

Nikhil Thampi

 

0683p000009LzJ4.png

 

 

 

View solution in original post

6 Replies
Anonymous
Not applicable
Author

Please try tDBinput-> tmap->thashoutput

 

a) In the tmap, add four output columns(for each context value) even though you are having single input date column

b) Convert the date to string in tmap and concatenate it with your context values.

c) Load the updated schema to thashoutput.

 

Note:- You can achieve the same using tjavarow also

 

Warm Regards,

 

Nikhil Thampi

Anonymous
Not applicable
Author

Differentiating context to different column makes this model complicated, I wanted to add these 4 context in a single column such that I can map them for multiple dates.
Example for 10th July 4 files must generate
For 11th 4 as well
And for 12th 4 as well
Anonymous
Not applicable
Author

Hi,

      It will not be complex if you take the base date also in the output flow as reference (screenshot below).

       Please note that I have taken the filedate as string from source itself (or you can convert in between stage). So concatenation will become easy.

 

      After that its pretty straightforward even if you are having multiple date records from source. 

      

       I hope this will resolve your issue.

 

Warm Regards,

 

Nikhil Thampi

 

0683p000009LzJ4.png

 

 

 

Anonymous
Not applicable
Author

Hi,

 

If the data in the other side is dynamic and if the date part is static, you always go for a tflowtoiterate to construct a loop and use append option in thashoutput to add additional data to Hash.

 

Warm Regards,

Nikhil Thampi

Anonymous
Not applicable
Author

Thanks it works for me !
Anonymous
Not applicable
Author

Hi,

 

Good to hear that you have resolved the issue.

Keep exploring Talend 🙂

 

Warm Regards,

Nikhil Thampi