OpenWeatherMap 5 day forecast jumbles into SQL table

I have the OpenWeatherMap 5 day forecast payload going into a Split to separate into 40 individual payloads and according to the debug, they Split in chronological order. However, I have it all going directly to a SQLite table and when I open the database, few of the date/times are mixed up (the last payload is shown from the debug as 7-13 but the table has a 7-9 date/time). I figure I can do an Order By command but unsure how the payloads get jumbled in between.

Do you mean the data are correct in the db, it is just that without an order by it is not coming back from the query in the order you expect? If so then that is not unusual. You cannot rely on the order returned by a query if you do not order it explicitly.

The data is in order from the debug going into the SQL node but when I check the table in SQLiteStudio, about 95% is in order with a few outliers that seemed to have gotten out of order.

As with any SQL table, you need to create an index. That should then ensure that any queries come back in the right order.


Don't worry about sorting the data when you insert it, just sort it in the query.

How to Order by Date in SQLite |

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.