You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Chad Johnston <cj...@megatome.com> on 2013/09/23 17:14:26 UTC

FYI - Pig CQL queries in Cassandra 1.2.10

I don't see this formally documented anywhere, so I thought I'd give a
heads-up to folks using Pig with Cassandra.

In pre-1.2.10 versions, storing data into Cassandra required a query like
this:
STORE data INTO 'cql://keyspace/table?output_query=update table set
some_value @ #' USING CqlStorage();

In 1.2.10, the expansion of the "@" and "#" characters has been removed,
and the query is now expected to be URL encoded. The above query would
become:
STORE data INTO
'cql://keyspace/table?output_query=update+table+set+some_value+%3D+%3F'
USING CqlStorage();

I've also found that you can't store Pig ints into Cassandra bigints any
more - you have to cast it to a long in your Pig script.

I've opened JIRAs for these issues:
https://issues.apache.org/jira/browse/CASSANDRA-6073
https://issues.apache.org/jira/browse/CASSANDRA-6083

Thanks,
Chad