"Extract Rows from Text Value (JSON Array)"
Hi,
Is there any solution to extract rows from text (JSON)? I couldn't find an appropriate rapid miner operater.
From a database table I get text data (JSON Array) from a column of the type BLOB.
Data like this:
[{"timestamp":1368525704,"event_type":"dom.movement","cursor_x":"671","cursor_y":"452"},
{"timestamp":1368525704,"event_type":"dom.movement","cursor_x":"657","cursor_y":"462"},
{...},
{...}]
I now want to extract each {...} as a row with columns split by the "," char. At the and I want to get a table like this:
How can I transform the JSON Array into rows?
I tried "Extract Document" -> "Cut Document" with RegEx \{(.*?)\} -> "Documents To Data". This works, but "Extract Document" extracts only one doc/row specified by the "example index" param.
Best,
Micha
Is there any solution to extract rows from text (JSON)? I couldn't find an appropriate rapid miner operater.
From a database table I get text data (JSON Array) from a column of the type BLOB.
Data like this:
[{"timestamp":1368525704,"event_type":"dom.movement","cursor_x":"671","cursor_y":"452"},
{"timestamp":1368525704,"event_type":"dom.movement","cursor_x":"657","cursor_y":"462"},
{...},
{...}]
I now want to extract each {...} as a row with columns split by the "," char. At the and I want to get a table like this:
timestamp | event_type | cursor_x | cursor_y |
1368525704 | dom.movement | 671 | 452 |
1368525704 | dom.movement | 657 | 462 |
... | ... | ... | ... |
I tried "Extract Document" -> "Cut Document" with RegEx \{(.*?)\} -> "Documents To Data". This works, but "Extract Document" extracts only one doc/row specified by the "example index" param.
Best,
Micha