Re: CqlStorage creates wrong schema for Pig

2013-09-04 Thread Miguel Angel Martin junquera
Oppps, sorry by my oversight I was checking the code and I was surprised it did not work with that pig script ... now , It works fine .. Many thanks,Chad Have a nice day Miguel Angel Martín Junquera Analyst Engineer. miguelangel.mar...@brainsins.com 2013/9/3 Chad Johnston

Re: CqlStorage creates wrong schema for Pig

2013-09-03 Thread Chad Johnston
You're trying to use FromCqlColumn on a tuple that has been flattened. The schema still thinks it's {title: chararray}, but the flattened tuple is now two values. I don't know how to retrieve the data values in this case. Your code will work correctly if you do this: *values3 = FOREACH rows

Re: CqlStorage creates wrong schema for Pig

2013-09-02 Thread Miguel Angel Martin junquera
*good/nice job !!!* * * * * *I'd testing with an udf only with string schema type this is better and elaborate work..* * * *Regads* Miguel Angel Martín Junquera Analyst Engineer. miguelangel.mar...@brainsins.com 2013/8/31 Chad Johnston cjohns...@megatome.com I threw together a quick UDF

Re: CqlStorage creates wrong schema for Pig

2013-09-02 Thread Miguel Angel Martin junquera
hi all: More info : https://issues.apache.org/jira/browse/CASSANDRA-5941 I tried this (and gen. cassandra 1.2.9) but do not work for me, git clone http://git-wip-us.apache.org/repos/asf/cassandra.git cd cassandra git checkout cassandra-1.2 patch -p1

Re: CqlStorage creates wrong schema for Pig

2013-09-02 Thread Miguel Angel Martin junquera
Hi 1.- May be? -- Register the UDF REGISTER /path/to/cqlstorageudf-1.0-SNAPSHOT -- FromCqlColumn will convert chararray, int, long, float, double DEFINE FromCqlColumn com.megatome.pig.piggybank.tuple.FromCqlColumn(); -- Load data as normal data_raw = LOAD 'cql://bookcrossing/books' USING

Re: CqlStorage creates wrong schema for Pig

2013-08-30 Thread Miguel Angel Martin junquera
I try this: *rows = LOAD 'cql://keyspace1/test?page_size=1split_size=4where_clause=age%3D30' USING CqlStorage();* *dump rows;* *ILLUSTRATE rows;* *describe rows;* * * *values2= FOREACH rows GENERATE TOTUPLE (id) as (mycolumn:tuple(name,value));* *dump values2;* *describe values2;* * *

Re: CqlStorage creates wrong schema for Pig

2013-08-30 Thread Chad Johnston
I threw together a quick UDF to work around this issue. It just extracts the value portion of the tuple while taking advantage of the CqlStorage generated schema to keep the type correct. You can get it here: https://github.com/iamthechad/cqlstorage-udf I'll see if I can find more useful

Re: CqlStorage creates wrong schema for Pig

2013-08-26 Thread Miguel Angel Martin junquera
hi Chad . I have this issue I send a mail to user-pig-list and I still i can resolve this, and I can not access to column values. In this mail I write some things that I try without results... and information about this issue.

CqlStorage creates wrong schema for Pig

2013-08-23 Thread Chad Johnston
(I'm using Cassandra 1.2.8 and Pig 0.11.1) I'm loading some simple data from Cassandra into Pig using CqlStorage. The CqlStorage loader defines a Pig schema based on the Cassandra schema, but it seems to be wrong. If I do: data = LOAD 'cql://bookdata/books' USING CqlStorage(); DESCRIBE data; I