Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
heshkaru
Creator
Creator

Identify Last Row in tDBinput

Hi,

I have a sequencial job as below image. For each row it should work. But I need to know how to identify whether it is the last row from the selected rows?

Thank you

Heshan Karunaratne

Labels (2)
2 Replies
anselmopeixoto
Partner - Creator III
Partner - Creator III

Hi @Heshan Karunaratne​ 

 

I'm not sure what is your use case, but I'd suggest you try the following:

 

  1. Store the data extracted from tDBInput using a tHashOutput (do this before the subjob shown in the image you sent).
  2. Then use a tHashInput to read the dataset stored in memory (just replace your current tDBInput by a tHashInput).

 

This way you would know exactly how many rows are stored in memory before processing the dataset.

You could add a sequential column to make it easier to know if the current row is the last row in your dataset.

 

I hope it helps.

Best regards,

Anselmo

Lord-Vader
Contributor III
Contributor III

I am not sure what you are trying to do, but maybe this will help idk.

What you can do is use the tAggregate Component and use the "last" function. You wil get the last row of every selected rows. so if you selected 10 rows, you wil get the 10th row.

(I would recommend to use the tHashInput/Output as the first comment said.)

0695b00000htbX9AAI.png

Click the multi rows add button. Set the function to last, set input to whatever column your requirements are. Then click ok. Set it into a tLogRow and BAM!!

0695b00000htbXJAAY.png

Hope this helps.

Vader out 💪.