Reputation: 31252
I am wondering if I could have json
data type in the column family
:
My table will have a unique row key
, and column name of "tweets_json" and column value of json content.
How would I create such a table in CQL/cassandra
or using python Driver
or CQLengine
?
tweet_json = json.encode({
"tweet_id" : tweet_id,
"body" : tweet_body,
"user_name" : this_user,
"timestamp" : timestamp
})
Basicall
Upvotes: 1
Views: 6759
Reputation: 6495
Just have a text column? If you're not looking to filter on the json, then that should be fine. If you are, then you'll need to store it as proper columns, rather than as json.
Upvotes: 3