Forum Discussion
Changing the order of JSON string to use as columns.
- 4 years ago
I believe that I start to understand. Not sure yet, if the column names are the names in the json records or the field values, so I created solutions for both. Please check the file enclosed.
Basically, you add a column that collects all data from the current row (except the json field) for the first row of a new table and then you determine the column names from the json in a second column. Finally, you create a new table in each row that assembles the values correctly.
But how is the data delivered then? In different queries? Different columns?
- Tony_Kuiper4 years ago
Helper I
I get a data file in CSV. There's about 40 columns and 95k rows.
One column has tags that are in the json format. The issue I have is the information I would use as the header doesn't appear in a consistent order. i.e "title": appears in any position from 1 to up to 20 something. If I split by delimiter and want to ensure all values for "title" are found I'll end up with 20 plus more columns. I don't have any real power to change how this data is created (I'm working on it) so I'm looking for a workaround to hunt out all the values tagged as "title" to have them in a single column. I can then discard the columns of little value. Target is about 5 key columns.
Hopefully this makes sense.