Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8C5E110B3D for ; Mon, 23 Sep 2013 15:15:03 +0000 (UTC) Received: (qmail 66453 invoked by uid 500); 23 Sep 2013 15:14:59 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 66430 invoked by uid 500); 23 Sep 2013 15:14:56 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 66414 invoked by uid 99); 23 Sep 2013 15:14:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Sep 2013 15:14:55 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [209.85.220.49] (HELO mail-pa0-f49.google.com) (209.85.220.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Sep 2013 15:14:48 +0000 Received: by mail-pa0-f49.google.com with SMTP id ld10so3681455pab.36 for ; Mon, 23 Sep 2013 08:14:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:date:message-id:subject:from :to:content-type; bh=RPS4x92YX3qYW6Y9NY0y3N7ypJD9BSRMz9mOoUEvQYE=; b=UathRPTuFDgo785qw6/YiAv64IECK+bO+M2BWKxkOHq4k9YyzPRtFtPoDY6CtmqSyI 59nGvHziL5yJ0QGD6RyU/T+CzbImpy0N2lg7qbQ7pkYxGckalPQWj+3DB8bVUtpzyL9f VlBbfMbAui5wyrSvSeR2VM8oDEi6nYbmMzt4iR7XGxa0gWFJn+e/pN2hE8+cslH6I8+s TROnos/CPrpzjJXv4cxA5OE/+zG5Jf78zanj9ujaz5yt3I87V7zU3qSAxnhFK97sedLw mAsvvOIXcn5oRFMlumT3aok64DXR3rRIiYYq1G4IkNO1FlYYqks6FSfm3fYgr3lJegyF BqwA== X-Gm-Message-State: ALoCoQkIFlAv9WoM0TVn+4iftoB4a7JDS8leF1q2/xx94/8Lw7/voi6OvjPCo6Kp8hEczehA7EmB MIME-Version: 1.0 X-Received: by 10.68.193.201 with SMTP id hq9mr1331638pbc.177.1379949266177; Mon, 23 Sep 2013 08:14:26 -0700 (PDT) Sender: iamthechad@megatome.com Received: by 10.70.12.4 with HTTP; Mon, 23 Sep 2013 08:14:26 -0700 (PDT) Date: Mon, 23 Sep 2013 09:14:26 -0600 X-Google-Sender-Auth: CaiX-tmxfZyN6iocwYC6zsAjVzk Message-ID: Subject: FYI - Pig CQL queries in Cassandra 1.2.10 From: Chad Johnston To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=047d7b15ab1bd1a01904e70e79de X-Virus-Checked: Checked by ClamAV on apache.org --047d7b15ab1bd1a01904e70e79de Content-Type: text/plain; charset=ISO-8859-1 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 --047d7b15ab1bd1a01904e70e79de Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I don't see this formally documented anywhere, so I th= ought I'd give a heads-up to folks using Pig with Cassandra.

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

In= 1.2.10, the expansion of the "@" and "#" characters ha= s 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=3Dupdate+table+= set+some_value+%3D+%3F' USING CqlStorage();

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

I've opened JIRAs for these issues:

Thanks,
Chad
--047d7b15ab1bd1a01904e70e79de--