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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Talindra
Contributor
Contributor

Filtering tDBInputs

Hi everyone.

 

 

 

I have two INPUTS (INPUT 1 and 2).

This two INPUTS goes to a tUnite component.

This tUnite components goes to an OUTPUT to insert in a table.

 

I want a filter (maybe with a tFilter component?) that if this tUnite doesn't have any rows (the INPUTS not return nothing), another INPUT (INPUT 3) is who has to make a select and go to the OUTPUT to insert.

 

 

Simple conditions:

IF INPUT 1/2 rows > 1 THEN go to OUTPUT (of course if INPUT 1/2 doesn't have any rows, INPUT 3 go to OUTPUT)

 

 

 

How can be possible?

0695b00000PLfCyAAL.png

Labels (4)
1 Solution

Accepted Solutions
gjeremy1617088143

Hi, it depend of the amount of data, you can try to rely your tUnite to a tHashOutput component and

after a on subjok ok between your first db input and an empty tJava your rely the tJava with an run if link to a tHashInput component with this condition :

tHashOutput_1_NB_LINE != null && tHashOutput_1_NB_LINE >0

so if the tUnite return some lines tHasInput will transfert the data store in the tHashOutput.

if you don't want to surcharge the memory you can rely the tUnite to an empty tJava with a main link

and chek tUnite_4_NB_LINE variable the same way as mentioned before.

then if it's not empty you request again with two new tDBinput.

View solution in original post

7 Replies
gjeremy1617088143

Hi, it depend of the amount of data, you can try to rely your tUnite to a tHashOutput component and

after a on subjok ok between your first db input and an empty tJava your rely the tJava with an run if link to a tHashInput component with this condition :

tHashOutput_1_NB_LINE != null && tHashOutput_1_NB_LINE >0

so if the tUnite return some lines tHasInput will transfert the data store in the tHashOutput.

if you don't want to surcharge the memory you can rely the tUnite to an empty tJava with a main link

and chek tUnite_4_NB_LINE variable the same way as mentioned before.

then if it's not empty you request again with two new tDBinput.

Talindra
Contributor
Contributor
Author

thanks for the response. what is a tHashOutput? I dont find that element

gjeremy1617088143

Hi @Ivan R​ you have to go to project settings -> designer ->palette then you open the technical folder of the hide section and you drag and drop tHash input and output to the show section then you select apply and close.

tHash component will be available in the palette, they are similar to tBuffer component but with more options.

 

https://help.talend.com/r/en-US/7.3/technical/thashinput

Talindra
Contributor
Contributor
Author

Thank you gjeremy. Im trying the second way you mentioned, without the tHash components.

 

But I don't understand exactly the flow. The tUnite must to be connected to the tJava as main with the condition? And then? I can't put a runif to the tAggregaterow...

 

And what's the thing with the input 3?

 

 

I have the flow as this right now

0695b00000PN6WEAA1.png 

 

gjeremy1617088143

hi , the purpose is to call the db two time , in the first one before tUnite you can try just a count on your value in the sql query ,

or sent like you do in the Input 1, send to an empty tjava, then you put an on subjob ok link between OFFERTAS_IBE_FUT_D+1 and a new tJava,

then you link the new tjava with the same job you do for input 1 with a run if link and in this link you put the condition .

Talindra
Contributor
Contributor
Author

Hi!

 

I put a tJava from INPUT1 with a SubjobOk, but then I can't put a runif from this tJava to the INPUT1 again... it don't let me

gjeremy1617088143

when i said the same job you you do for input1 --> you have to create new input 1 and input 2