I am very new in Knime and Data Science. I searched a lot, but could not find a similar topic which could help me to solve my problem.
I am trying to GET data from a web page which supports REST API. There are two options for formatting; Json-stat and csv file. When it comes to csv I am able to get data and create a table. But json-stat is not flat and I couldnot write json-path or even do not understand how I can achieve that. I tried approximately every combination in Knime forums and hub. Json to table, Jsonpath, Cell splitt, ungroup and so onâŚ
Thank you for your answer. I got your point and it helps me a lot.
Do you have any idea about how one can convert it to a table? I mean JSON-stat files are files that contains table with a described pattern. Also they could store very large amount of data. So I am afraid of that I could change data when I am trying to get it. For example, we have 2 color options, 3 material options and 6 values. How can I extract this table without interference?
I kind of create a workflow which operates Unpivoting many times as âidâ arrays length. But I am not sure if it could work with all JSON-stat files.
I share the file with my entry, so you could check if I am wrong.
It seems, that the outcome of your and my solution are the same. I saved your outcome into a csv File and matched your data with my .
I started with your GET Request. Based on the JSON-stat description I get the list of the used id[] with the JSON Path Node.
WARN: There is a different use of this ID in your dataset: JSON-stat Format says that the parent from ID is âRootâ (when class âdatasetâ). In your dataset the parent is âDimensionâ. My solution based on your dataset. The JSON Path Node must be changed, if anybody used the right format.
Based on this ID list (so you can change this list or the count of the id[] in your dataset) I collected all values of the idâs. The collected size is 21 * 3 * 174 *1 (Alder * Kjonn * Tid * ContentsCode). At last the table were appended with the extracted values from value[].
I could not assign some of the data of your outcome correctly, so I left them out of my solution.