Hi.
I have a problem parsing a json file containing a matrix.
{"waferMap":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
...
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,1,1,1,1,1,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],"dieSize":1683.0,"lotName":"lot1","waferIndex":1.0,"trianTestLabel":[["Training"]],"failureType":[["none"]]}
This is one line in the JSON file I have.
I loaded this JSON file with the "Input Data" block. As a result, the matrix corresponding to the waferMap was split as shown in the picture below.
Here is the result I want:
waferMap | dieSize | lotName | waferIndex | trianTestLabel | failureType |
[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], ... [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,1,1,1,1,1,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]] | 1683.0 | "lot1" | 1.0 | "Training" | "none" |
A matrix of waferMap represents an 26by26 resolution image.
How do I get these results?
Solved! Go to Solution.
hi @MinjiKim
The JSON parse tool(or the Input Data tool, configured to parse JSON files) is very simple. It splits the entire file into a single element per line. There's no way to change this default behaviour. If you want a different granularity, you can rebuild the pieces up from the individual elements, or import the file as text and parse it out using a combination of regex and formula tools.
Here's a solution that the uses the first approach.
The JSON Parse tool is configured to output the data into typed fields, whihc makes the logic in the rest of the workflow a little easier. The equivalent operation in the Input Data is to uncheck "Parse Value as String" Then it's matter of rebuilding the matrix, adding the quotes back into the string fields and crosstabbing the output
Note that trianTestLabel and failureType can both be arrays. If the you need to rebuild those as arrays, use a technique similar to the the first Summarize tool in the Rebuild Matrix container.
Dan
This is so helpful!
Thanks a lot
The size of the original file is very large, so it may be difficult to attach.
But thank you so much for your interest!