Ebot Tabi
Ebot Tabi

Reputation: 92

Best approach in converting and storing json objects into Apache Cassandra

I have an API service where user push arbitrary json objects, these json objects can be nested and others just normal. I am facing some challenges on how to effectively convert the incoming json objects into something much more suitable for storage on cassandra. Advice on how to handle is highly appreciated.

Thanks.

Upvotes: 3

Views: 3482

Answers (1)

Alex Popescu
Alex Popescu

Reputation: 4002

As suggested by @omnibear you should take a look at the linked answer. Basically what you need to figure out before deciding on a solution is the answer to the question: "how do you process each JSON after storing it?". Some possible scenarios:

  1. if you process it as it is, then you can store it as a blob
  2. if you have situations where you need to modify a predefined subset of the attributes of the JSON, then you might want to store those as columns and the rest of the JSON as a blob

Upvotes: 3

Related Questions