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

Data flow down in Talend

Hi,

I am new to Talend, working on a project where i need to flow the data down from previous transactions.

Please help

Here's an example

 

Input

ID, Rev, Col1, Col2, Col3

1, 1, X1, NULL, X4

1, 2, NULL, NULL, NULL

1, 3, X2, X3, NULL

1, 4, NULL, NULL, NULL

 

Output

ID, Rev, Col1, Col2, Col3

1, 1, X1, NULL, X4

1, 2, X1, NUL, X4

1, 3, X2, X3, X4

1, 4, X2, X3, X4

 

I am struggling to hold the previous row values. Also, this data is for particular id, values flow within the id rows only.

 

Please help

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

You can do this in tMap or in a tJavaRow.  

If the number of columns is not too many, a tJavaRow may be faster.

You will assign the current not null value to a globalMap variable.  Then pull the value from globalMap variable and replace the column value if the column value is null.  If the column value is not null, then maybe you want to overwrite the globalMap variable.

Look at the help for the tJavaRow

 

View solution in original post

3 Replies
Vilas4muppidi
Contributor
Contributor

The output you mentioned is what you are expecting

Anonymous
Not applicable
Author

Yes, that is what i am expecting..
If id is same and column has no value , the last entry's value should flow down
Anonymous
Not applicable
Author

You can do this in tMap or in a tJavaRow.  

If the number of columns is not too many, a tJavaRow may be faster.

You will assign the current not null value to a globalMap variable.  Then pull the value from globalMap variable and replace the column value if the column value is null.  If the column value is not null, then maybe you want to overwrite the globalMap variable.

Look at the help for the tJavaRow