Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Cloud Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Cloud.
SOLVED

I want to organize a column in a particular order but I can't find any function that supports it.

4d54873a545f04fb2ca3
8 - Asteroid

I know in the Enterprise edition you can sort by Ascending and Descending order within Edit Column but there is only an option of Hide under this menu on Dataprep. Suggestions?

3 REPLIES 3
Trifacta_Alumni
Alteryx Alumni (Retired)
As stated in the documentation, (https://cloud.google.com/dataprep/docs/html/Product-Limitations_60720399) the sort function is unfortunately not supported. This limitation is due to the underlying engine used that does not support global sorting as sorting (especially by key) requires globally serial processing, which is not a scalable operation. Dataflow does not provide such support, as it is frequently unnecessary. Maybe we can try to help you if you can describe why you would need to sort the entire dataset. A workaround is maybe possible in your case.
Trifacta_Alumni
Alteryx Alumni (Retired)

A workaround could be to use a window function and orderBy the column you want to sort by.

 

(Note that the data is sorted for the window transform, but any subsequent transform (including the store transform) will most likely destroy the order.

Therefore, you will only be able to see the sorted dataset in your browser but when you output it, the order will not be preserved.)

 

 

In order to do this, you need to:

  1. Add a new step to your recipe
  2. Search for the window function
  3. Type the name of the column you want to sort by in the formula input
  4. Then type the name of the column again in the 'order By' input (you can add a '-' in front of the column for descending order).
  5. Add the step

 

4d54873a545f04fb2ca3
8 - Asteroid

This is a very detailed response and has everything I need. Thanks for your help Hugues!