
The term " fields in the second csv out of order " may have several meanings
- The same source csv file, but from time to time different fields
- The field position (column number) in the csv file is different in the files provided by different sources.
The first case is really strange. The same source must provide the same data, and if it is not, the decision logic can be very complex.
The second case looks more real. In this case, u can make all sources available up to 35 fields. Then you need to define the fields. There are many tools available in the teapot for detecting a data type, string manipulation, regular expression, etc.
Actually, it sounds like you need automatic field detection.
But without real data, it's hard to see a pattern. Since u implements this logic of detecting fields at the database level, then this is also possible in the teapot.
Anyway. If the logic is really complicated, use JavaStep, JavaScript.
source share