🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

"Extract Rows from Text Value (JSON Array)"

User: "megmed"
New Altair Community Member
Updated by Jocelyn
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:
timestampevent_typecursor_xcursor_y
1368525704dom.movement671452
1368525704dom.movement657462
............
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

Find more posts tagged with