turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Home
- :
- Talend Category
- :
- Community Discussions
- :
- Design and Development
- :
- [resolved] Does tAggregateRow preserve the sort or...

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-07-2010
05:26 PM

01-07-2010
05:26 PM

Does tAggregateRow preserve the sort order of the input flow in all cases?

For example, will the following input:

MbrID|RowID|Value

1|1|A

1|2|B

1|3|C

2|1|D

2|2|E

when aggregating the third field as a list, always result in the following output:

MbrID|Values

1|A,B,C

2|D,E

or might the order of the values be changed?

It appears that the list function of tAggregateRow achieves the same result as tDenormalize (although with less flexibility i.e. cannot merge values or specify delimiter). However, tDenormalize has a warning that "the component may change input order".

Note that I do not want to use tAggregateSortedRow because of the difficulty of obtaining the required "input row count" resulting from my very complex mappings.

Thanks!

For example, will the following input:

MbrID|RowID|Value

1|1|A

1|2|B

1|3|C

2|1|D

2|2|E

when aggregating the third field as a list, always result in the following output:

MbrID|Values

1|A,B,C

2|D,E

or might the order of the values be changed?

It appears that the list function of tAggregateRow achieves the same result as tDenormalize (although with less flexibility i.e. cannot merge values or specify delimiter). However, tDenormalize has a warning that "the component may change input order".

Note that I do not want to use tAggregateSortedRow because of the difficulty of obtaining the required "input row count" resulting from my very complex mappings.

Thanks!

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-07-2010
07:41 PM

01-07-2010
07:41 PM

Hello

Yes, tAggregateRow doesn't preserve the order of the flow eg:

1|1|A

1|2|C

1|3|B

2|1|D

2|2|E

3|1|B

3|2|A

4|1|B

4|2|A

o/p:

3|B,A

4|B,A

1|A,C,B

2|D,E

Normally, it need a tSortRow component after tAggregateRow to sort the rows.

Best regards

shong

Does tAggregateRow preserve the sort order of the flow?

Yes, tAggregateRow doesn't preserve the order of the flow eg:

1|1|A

1|2|C

1|3|B

2|1|D

2|2|E

3|1|B

3|2|A

4|1|B

4|2|A

o/p:

3|B,A

4|B,A

1|A,C,B

2|D,E

Normally, it need a tSortRow component after tAggregateRow to sort the rows.

Best regards

shong

----------------------------------------------------------

Talend | Data Agility for Modern Business

Talend | Data Agility for Modern Business

6 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-07-2010
07:41 PM

01-07-2010
07:41 PM

Does tAggregateRow preserve the sort order of the flow?

Yes, tAggregateRow doesn't preserve the order of the flow eg:

1|1|A

1|2|C

1|3|B

2|1|D

2|2|E

3|1|B

3|2|A

4|1|B

4|2|A

o/p:

3|B,A

4|B,A

1|A,C,B

2|D,E

Normally, it need a tSortRow component after tAggregateRow to sort the rows.

Best regards

shong

----------------------------------------------------------

Talend | Data Agility for Modern Business

Talend | Data Agility for Modern Business

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-07-2010
08:04 PM

01-07-2010
08:04 PM

Thanks, Shong.

So the order of the records ("grouped by" fields) is not preserved. What about the order of the values in the "listed" field?

I.e. might the output from your input be, for example:

3|B,A

4|A,B

1|A,B,C

2|D,E

So the order of the records ("grouped by" fields) is not preserved. What about the order of the values in the "listed" field?

I.e. might the output from your input be, for example:

3|B,A

4|A,B

1|A,B,C

2|D,E

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-07-2010
08:19 PM

01-07-2010
08:19 PM

Hello

It always preserves the order of value of list.

Best regards

shong

What about the order of the values in the "listed" field?

It always preserves the order of value of list.

Best regards

shong

----------------------------------------------------------

Talend | Data Agility for Modern Business

Talend | Data Agility for Modern Business

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-07-2010
08:20 PM

01-07-2010
08:20 PM

Great! Thanks

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-07-2010
09:10 PM

01-07-2010
09:10 PM

Sorry, I do have a further question:

If tAggregateRow groups on the first two fields in the following example and lists the fourth field, is the order of the second field relative to the first field preserved?

Input:

1|1|1|A

1|1|2|B

1|1|3|C

1|2|1|F

1|2|2|D

1|2|3|E

2|1|1|D

2|1|2|E

2|2|1|F

2|2|2|G

3|1|1|B

3|1|2|A

3|2|1|C

3|2|2|D

4|1|1|D

4|1|2|C

4|2|1|A

4|2|2|B

Output1:

3|1|B,A

3|2|C,D

4|1|D,C

4|2|A,B

1|1|A,B,C

1|2|F,D,E

2|1|D,E

2|2|F,G

or output2:

4|2|A,B

3|1|B,A

4|1|D,C

2|2|F,G

1|1|A,B,C

3|2|C,D

1|2|F,D,E

2|1|D,E

Thanks

If tAggregateRow groups on the first two fields in the following example and lists the fourth field, is the order of the second field relative to the first field preserved?

Input:

1|1|1|A

1|1|2|B

1|1|3|C

1|2|1|F

1|2|2|D

1|2|3|E

2|1|1|D

2|1|2|E

2|2|1|F

2|2|2|G

3|1|1|B

3|1|2|A

3|2|1|C

3|2|2|D

4|1|1|D

4|1|2|C

4|2|1|A

4|2|2|B

Output1:

3|1|B,A

3|2|C,D

4|1|D,C

4|2|A,B

1|1|A,B,C

1|2|F,D,E

2|1|D,E

2|2|F,G

or output2:

4|2|A,B

3|1|B,A

4|1|D,C

2|2|F,G

1|1|A,B,C

3|2|C,D

1|2|F,D,E

2|1|D,E

Thanks

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-07-2010
10:28 PM

01-07-2010
10:28 PM

Hello

No, this component doesn't preserve the order of columns which are group key and sort the rows.

Best regards

shong

is the order of the second field relative to the first field preserved?

No, this component doesn't preserve the order of columns which are group key and sort the rows.

Best regards

shong

----------------------------------------------------------

Talend | Data Agility for Modern Business

Talend | Data Agility for Modern Business