You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by puneet loya <pu...@gmail.com> on 2012/04/13 08:31:17 UTC
insert data in cassandra from .net..
I m able to connect cassandra and fetch rows from the cassandra database.
Now i want to insert the data from .net on to cassandra
but using insert query of cql is not working because i have fields in my
table which has null values for the columns and cassandra would not take
null values.
So now i have to query it the other way.. i.e, i can use set [key] [column
name] = column value;
but can i send this command from .net to cassandra.
I mean we have execute_cql_query() for interacting in a cql way, is there
anything available for the other way? that is the commands we execute on
cassandra-cli.bat ?
Re: insert data in cassandra from .net..
Posted by puneet loya <pu...@gmail.com>.
Thnx a lot :) :)
On Sat, Apr 14, 2012 at 11:59 PM, aaron morton <aa...@thelastpickle.com>wrote:
> but using insert query of cql is not working because i have fields in my
> table which has null values for the columns and cassandra would not take
> null values.
>
> You do not need to insert the null values. How they are handled depends on
> the .net client you are using. If you really want to insert them try using
> an empty string.
>
> For background here is a good post about using cassandra on windows with
> links to a couple of .net client libraries…
>
> http://kellabyte.com/2012/02/13/getting-started-using-apache-cassandra/
>
>
> Cheers
>
>
> -----------------
> Aaron Morton
> Freelance Developer
> @aaronmorton
> http://www.thelastpickle.com
>
> On 13/04/2012, at 6:31 PM, puneet loya wrote:
>
> I m able to connect cassandra and fetch rows from the cassandra database.
>
> Now i want to insert the data from .net on to cassandra
>
> but using insert query of cql is not working because i have fields in my
> table which has null values for the columns and cassandra would not take
> null values.
>
> So now i have to query it the other way.. i.e, i can use set [key] [column
> name] = column value;
>
> but can i send this command from .net to cassandra.
>
>
> I mean we have execute_cql_query() for interacting in a cql way, is there
> anything available for the other way? that is the commands we execute on
> cassandra-cli.bat ?
>
>
>
Re: insert data in cassandra from .net..
Posted by aaron morton <aa...@thelastpickle.com>.
> but using insert query of cql is not working because i have fields in my table which has null values for the columns and cassandra would not take null values.
You do not need to insert the null values. How they are handled depends on the .net client you are using. If you really want to insert them try using an empty string.
For background here is a good post about using cassandra on windows with links to a couple of .net client libraries…
http://kellabyte.com/2012/02/13/getting-started-using-apache-cassandra/
Cheers
-----------------
Aaron Morton
Freelance Developer
@aaronmorton
http://www.thelastpickle.com
On 13/04/2012, at 6:31 PM, puneet loya wrote:
> I m able to connect cassandra and fetch rows from the cassandra database.
>
> Now i want to insert the data from .net on to cassandra
>
> but using insert query of cql is not working because i have fields in my table which has null values for the columns and cassandra would not take null values.
>
> So now i have to query it the other way.. i.e, i can use set [key] [column name] = column value;
>
> but can i send this command from .net to cassandra.
>
>
> I mean we have execute_cql_query() for interacting in a cql way, is there anything available for the other way? that is the commands we execute on cassandra-cli.bat ?