python - How to alter table add column if column not exists in cassadra? -


I have some predefined columns in the Cassandra table / column family. I also get another JSON / Is: The value pair which is not predefined and therefore was not included in the table description (I'm using cql3 library on python) I want to add this data to my own calendars table, I need a unique key in the Jason object to become a new column. If a key that has already been created in a column, then exists in JSN, Cassandra should reject that query without throwing an exception. It throws an exception if I try to change the table to add the already existing column. Does the column add a column if the type query does not exist in the column or should I handle it with exception handling?

There is currently no mechanism to do this if currently functionality If not (take a look at conditional schema modifications).

I want to redesign the table so that you can call key to call in the column (in the form of columns) and ending its various values Use something like with collection for:

  key | Date_added | Value -------- + -------------------------------------- + - ------ 1 | E64d8be0-4f2a-11e4-b409-138283d4b034 ['Item 1', 'item 2'] 7 | E64d8be0-4f2a-11e4-b409-138283d4b034 ['Item 1', 'item5'] 1 | E64d8be0-4f2a-11e4-b409-138283d4b034 ['Item4']   



Note one side, if you do not have any then << code> every time you change You have to verify a lot of overhead from a query that the row does not exist.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -