I am trying to save some tweets in a Cassandra Database using the Python driver and DataStax (Python -> Cassandra).
Everything works well, but there is something that I cannot understand. How to insert a row without a null value?
As an example
CREATE TABLE tweets ( id_tweet text PRIMARY KEY, texttweet text, hashtag text, url text, )
If I want to insert a row without a url value, it works, but in Cassandra I will see "null" in the url column.
I check this document:
http://datastax.imtqy.com/python-driver/getting_started.html#passing-parameters-to-cql-queries
So, I tried 2 different ways:
First I create a String as a complete string and execute it.
requete = "insert into Tweets(id_tweet,texttweet,hashtag,url) values ('%s','%s','%s','%s')"%(id_tweet,texttweet,hashtag,url) session.execute(requete)
Or
I am sending parameters to the execution function.
requete2 = "insert into Tweets(id_tweet,texttweet,hashtag,url) values ('%s','%s','%s','%s')" session.execute(requete2,(id_tweet,id_texttweet,hashtag,url))
The problem is that the 2differents methods give me a null value if I don't get the URL or Hashtag in my tweet as an example.
Is it possible to see a column if it is empty in a row, as I see in many textbooks?

Thanks.