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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

i have row filled with values in tfileinputdelimited . Help me converting to a specified format as below

 

 

Actually , my reqt is the count can be dynamic , say if count is 5  , then there should be 5 ids in a row.

The input column can have thousands of Ids.

 (content in tfileinputdelimited.)

1

2

3

4

5

6

7

8

9

10

 

should be as

1,2,3,4,5

6,7,8,9,10

Labels (2)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

The idea of @fdenis is a good one.

Here is a new version.


rahin.zip

View solution in original post

13 Replies
TRF
Champion II
Champion II

So, you need to concatenate the previous row with the current one. The is a lot of posts regarding this kind of question. Check this one for example:
https://community.talend.com/t5/Design-and-Development/How-to-get-previous-row-tuple-s-value-without...
Anonymous
Not applicable
Author

Actually , my reqt is the count can be dynamic , say if count is 5  , then there should be 5 ids in a row.

The input column can have thousands of Ids.

 

1

2

3

4

5

6

7

8

9

10

 

should be as

1,2,3,4,5

6,7,8,9,10 

TRF
Champion II
Champion II

Just the same answer.
You just need to add a Numeric.sequence to count 5 rows and an output filter to reject any row until the counter reach the value of 5.
An other solution possible with 2 Numeric.sequence to build groups of 5 rows and a tAggregateRow to have all the rows from the same group grouped on a line with the desired separator (list option).
Anonymous
Not applicable
Author

TRF,

 

Im not getting your point  . how will i build that numeric sequence. Could you get me the component flow which i need to use.

Anonymous
Not applicable
Author

@rhall could you please help me out in detail

Anonymous
Not applicable
Author

How does tmemorizerow  component work . Does using tmemorizerows serves me . Please let me know how to use it ? @rhall @TRF

TRF
Champion II
Champion II

Here is what you need.

Maybe there is better solutions but this one works as soon as the input flow has a number of rows multiple of 5.


rahin.zip
Anonymous
Not applicable
Author

TRF,

 

Thank you , but what am expecting .it should work even if there are 12 or 13 or 14 rows . Your solution works only when the row count is divisible by 5.

 

If the input is

abc1

def3

ghi2

jkq4

aef

yfj

ope

The rows yfj , ope gets ommitted . only abc1,def3,ghi2,jkq4,aef  is printed.

 

Expected output:

abc1,def3,ghi2,jkq4,aef 

yfji,ope

 

 

 

fdenis
Master
Master

with tMap, you can add an id who is the modulo of the line index-1.
result is:
id data
0 1
0 2
0 3
0 4
0 5
1 6
1 7
1 8
1 9
1 10
then use tDenormalizeSortedRow (id as key)
good luck