Page 1 of 1

can target dataset preserve pre sorted data?

Posted: Mon May 04, 2009 2:19 am
by tverma27
Hi

In my project we are doing Sorting on some business columns and want to load the sorted data in a dataset.

But my concern is since input data will move to different nodes of the dataset, Will the sorting remain preserved in the dataset?


Thanks in advance!

Posted: Mon May 04, 2009 2:54 am
by mahadev.v
Sorting and partition of the data can be maintained in a DataSet. Use Same partition on the DataSet input link. As long as you are not repartitioning the sorted data this would work.

Posted: Mon May 04, 2009 3:12 am
by tverma27
Thanks for your quick reply
i am doing a database sorting so will SAME partition help?

Posted: Mon May 04, 2009 4:17 am
by mahadev.v
Might work. Data would get repartitioned but the sort order in each partition should remain.

Posted: Mon May 04, 2009 5:52 am
by stefanfrost1
Depends on which database (stage) and read method you are using. If you're not reading data from each database partition(node) your data will be returned on a single node and thereby your dataset will remain as a single node when using SAME partitioning.

Using DB2EE-stage for example and read method table would return data on as many nodes as your db is configured on and using db2 hash algoritm, so using SAME partitioning in this case would preserve your sort and partitioning as from the db.

Posted: Mon May 04, 2009 4:21 pm
by ray.wurlod
Repartitioning will, as a general rule, destroy any sorting (which is per-partition).