Sort / Order columns of a dataset

Solved!
UserBird
Dataiker
Sort / Order columns of a dataset
Can I reorder the column of a dataset, in the Explore view or the Prepare recipe?
1 Solution
kenjil
Dataiker
5 Replies
AdrienL
Dataiker
Generally speaking, there is not, unfortunately. You can however select the columns you want to display: when viewing a dataset, click the "Display" button in the upper right corner, then "Select displayed columns". You can also quickly scroll to another column by pressing the "C" key. Finally, you can highlight a line for easier comparison by pressing Shift+H while hovering the line.

As a side note, DSS will generally abide by the column order in the underlying storage's schema, so reordering the columns before importing the dataset is also a workaround.
Clรฉment_Stenac
Hi,

Generally speaking, DSS does not have this feature.

You can however select the columns you want to display: when viewing a dataset, click the "Display" button in the upper right corner, then "Select displayed columns". You can also quickly scroll to another column by pressing the "C" key. Finally, you can highlight a line for easier comparison by pressing Shift+H while hovering the line.

DSS always show the columns in their "natural" order. You can thus also use a "Sync" recipe to achieve this, at the expense of duplicating your data. The sync recipe has two modes : "Strict schema equality", which maintains the input schema in the output, or "free schema". In that latter mode, you can edit the output schema to match what you want, and DSS will copy the columns from the input by their name.

Hope this helps,
Alex_Reutter
Dataiker Alumni

In DSS 4.3, the Move Columns processor (https://doc.dataiku.com/dss/latest/preparation/processors/move-columns.html) was added.

0 Kudos
Stephen_Haptons
Level 1
Use a SQL recipe and create a SELECT statement that selects the columns in the order you want -- this is best with SQL datasets. Or create Python or R recipes that do the same, although these run into problems with larger datasets. As with Clรฉment's answer, this duplicates the dataset, but it's easy enough.
0 Kudos
kenjil
Dataiker

Labels

?
Labels (2)
A banner prompting to get Dataiku