One Star

Sort Rows - Nulls at the end

Hi
Can anyone please tell me how to achieve below scenario? Need to sort the rows making sure that the nulls comes at the end.
Input
ID
98
99
null
100
null
36
Output
ID
100
99
98
36
null
null
Thank you.
5 REPLIES
One Star

Re: Sort Rows - Nulls at the end

Use the tSortRow component you can sort by num descending
One Star

Re: Sort Rows - Nulls at the end

Hi,
Thank you for the reply.
We can use tSortRow to sort the data. But it does have provision to handle the null values.
Regards,
Sangi
One Star

Re: Sort Rows - Nulls at the end

Hi,
Thank you for the reply.
We can use tSortRow to sort the data. But it does not have provision to handle the null values.
Regards,
Sangi
Community Manager

Re: Sort Rows - Nulls at the end

Hi
Convert null value to 0 (or an other number) before sorting them, and then convert 0 to null value after sorting.
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Sort Rows - Nulls at the end

Hi
Thank you. Its a good workaround.
However, it will be good to include an option in sort component to handle the nulls.
-
Sangi