querying larg text file containing JSON objects.
Posted
by Maciek Sawicki
on Stack Overflow
See other posts from Stack Overflow
or by Maciek Sawicki
Published on 2010-05-28T10:45:52Z
Indexed on
2010/05/28
11:01 UTC
Read the original article
Hit count: 261
Hi, I have few Gigabytes text file in format: {"user_ip":"x.x.x.x", "action_type":"xxx", "action_data":{"some_key":"some_value"...},...}
each entry is one line.
First I would like to easily find entries for given ip. This part is easy because I can use grep for example. However even for this I would like to find better solution because I would like to get response as fast as possible.
Next part is more complicated because I would like to find entries from selected ip and of selected type and with particular value of some_key in action_data.
Probably I would have to convert this file to SQL db (probably SQLite, because it will be desktop APP), but I would ask if there are exists better solutions?
© Stack Overflow or respective owner