I have a csv file that’s being uploaded, and the order of the row matters. I’ve tested in the past that when I use table query, it’s been consistent of how the row showing up reflecting the order of the csv I uploaded.
But today I learn it might not? I didn’t use sort to order them and now I’m a little worried that the order won’t reflect the same. I’m trying to understand so should add another column to use it for sorting to make the order of row consistent.
By default the order of entries in a table is by date of creation oldest to newest.
If you want to change that you need to order by a column. You could also create a column just for the sort key.
If I upload the csv file, most likely they will be with the same created-at date. Then should it always return the same order of the csv?
Hi Chieu,
When rows have the same created-at timestamp (like when a CSV upload creates them all at once), Tulip doesn’t guarantee they’ll always appear in the same order unless you explicitly sort them in your query. In practice, you might see them load in the same sequence you uploaded, but it’s not something you can rely on.
To make the order consistent, it’s best to add a column (for example, SortOrder) to your CSV and populate it with the row’s intended position. Then sort by that column in your table query.