You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Miguel Angel Martin junquera <mi...@gmail.com> on 2013/07/16 13:03:47 UTC
Pig load data with cassandrastorage and slice filter param
hi all
I trying to load data from cassandra with slice params option but ther are
no much info about how to use i. I found only a quick reference in
readme.txt in cassandra project .../examples/pig
*...*
*Slices on columns can also be specified:*
*grunt> rows = LOAD
'cassandra://MyKeyspace/MyColumnFamily?slice_start=C2&slice_end=C4&limit=1&reversed=true'
USING CassandraStorage();*
*Binary values for slice_start and slice_end can be escaped such as '\u0255'
*
*...**
*
I want to filter the initial load data by day o range dates and I only
found this info about cassandra and pig
- http://rubyscale.com/blog/2011/03/06/basic-time-series-with-cassandra/
- http://www.datastax.com/dev/blog/advanced-time-series-with-cassandra
I,m going to try to do a test with dummy data with Composite column
Family like anuniqueIDGenerate:timestamp for example or
anuniqueIDGenerate:stringdate where date is a string with dornat YYY-MM-dd
for example
Another option is use Supercolumn family by day for example ad try to use
slice with this feature
Or another option is create a custom load cassandra but perhaps It´s more
complex and I could this features.
I will appreciate any help or example how I must define cassandra data and
Pig example load with slice.
Thanks in advance and king regards
Re: Pig load data with cassandrastorage and slice filter param
Posted by aaron morton <aa...@thelastpickle.com>.
It's easier for people to help if you can give an example of your Column Family, what have tried, what the output was and what you expected.
> > grunt> rows = LOAD 'cassandra://MyKeyspace/MyColumnFamily?slice_start=C2&slice_end=C4&limit=1&reversed=true' USING CassandraStorage();
Appears to be syntactically correct.
Cheers
-----------------
Aaron Morton
Cassandra Consultant
New Zealand
@aaronmorton
http://www.thelastpickle.com
On 19/07/2013, at 12:16 AM, Miguel Angel Martin junquera <mi...@gmail.com> wrote:
> hi A:
>
> Thank you for responding to my e-mail.
>
> Sorry if i did not express my questions/doubts well.
>
> I try to use the slice feature with CassandraStorage LOAD but I do not know how to do it. I cannot find any detailed documentation about it.
>
> I found only the references in my last mail.
>
> Yet i don run any command because I dont know if Composite column Family the best solution to load data filtering range by day, or define supercolumns and how this will work with cassandraStorage-Slice LOADS in PIG and how to create the LOAD statment with slice in cassandraStorage. So I am working trial and error method at this develop.
>
>
> I will appreciate any help or example how I must define cassandra data CF for filter by day (composite CF with timestamp or string with format YYY-MM-dd or super column, or any other feature) and Pig example that load cassandra data with slice feature.
>
> Thanks in advance
>
>
>
>
>
> 2013/7/17 aaron morton <aa...@thelastpickle.com>
> Not sure I understand the question. What was the command that failed?
>
> Cheers
>
>
> -----------------
> Aaron Morton
> Cassandra Consultant
> New Zealand
>
> @aaronmorton
> http://www.thelastpickle.com
>
> On 16/07/2013, at 11:03 PM, Miguel Angel Martin junquera <mi...@gmail.com> wrote:
>
> > hi all
> >
> > I trying to load data from cassandra with slice params option but ther are no much info about how to use i. I found only a quick reference in readme.txt in cassandra project .../examples/pig
> >
> > ...
> > Slices on columns can also be specified:
> > grunt> rows = LOAD 'cassandra://MyKeyspace/MyColumnFamily?slice_start=C2&slice_end=C4&limit=1&reversed=true' USING CassandraStorage();
> > Binary values for slice_start and slice_end can be escaped such as '\u0255'
> > ...
> >
> >
> > I want to filter the initial load data by day o range dates and I only found this info about cassandra and pig
> >
> > • http://rubyscale.com/blog/2011/03/06/basic-time-series-with-cassandra/
> > • http://www.datastax.com/dev/blog/advanced-time-series-with-cassandra
> >
> >
> > I,m going to try to do a test with dummy data with Composite column Family like anuniqueIDGenerate:timestamp for example or anuniqueIDGenerate:stringdate where date is a string with dornat YYY-MM-dd for example
> >
> > Another option is use Supercolumn family by day for example ad try to use slice with this feature
> >
> >
> > Or another option is create a custom load cassandra but perhaps It´s more complex and I could this features.
> >
> > I will appreciate any help or example how I must define cassandra data and Pig example load with slice.
> >
> > Thanks in advance and king regards
> >
> >
> >
>
>
Re: Pig load data with cassandrastorage and slice filter param
Posted by Miguel Angel Martin junquera <mi...@gmail.com>.
hi A:
Thank you for responding to my e-mail.
Sorry if i did not express my questions/doubts well.
I try to use the slice feature with CassandraStorage LOAD but I do not
know how to do it. I cannot find any detailed documentation about it.
I found only the references in my last mail.
Yet i don run any command because I dont know if Composite column Family
the best solution to load data filtering range by day, or define
supercolumns and how this will work with cassandraStorage-Slice LOADS in
PIG and how to create the LOAD statment with slice in cassandraStorage. So I
am working *trial and error method *at this develop.
I will appreciate any help or example how I must define cassandra data CF
for filter by day (composite CF with timestamp or string with format
YYY-MM-dd or super column, or any other feature) and Pig example that
load cassandra data with slice feature.
Thanks in advance
2013/7/17 aaron morton <aa...@thelastpickle.com>
> Not sure I understand the question. What was the command that failed?
>
> Cheers
>
>
> -----------------
> Aaron Morton
> Cassandra Consultant
> New Zealand
>
> @aaronmorton
> http://www.thelastpickle.com
>
> On 16/07/2013, at 11:03 PM, Miguel Angel Martin junquera <
> mianmarjun.mailinglist@gmail.com> wrote:
>
> > hi all
> >
> > I trying to load data from cassandra with slice params option but ther
> are no much info about how to use i. I found only a quick reference in
> readme.txt in cassandra project .../examples/pig
> >
> > ...
> > Slices on columns can also be specified:
> > grunt> rows = LOAD
> 'cassandra://MyKeyspace/MyColumnFamily?slice_start=C2&slice_end=C4&limit=1&reversed=true'
> USING CassandraStorage();
> > Binary values for slice_start and slice_end can be escaped such as
> '\u0255'
> > ...
> >
> >
> > I want to filter the initial load data by day o range dates and I only
> found this info about cassandra and pig
> >
> > •
> http://rubyscale.com/blog/2011/03/06/basic-time-series-with-cassandra/
> > •
> http://www.datastax.com/dev/blog/advanced-time-series-with-cassandra
> >
> >
> > I,m going to try to do a test with dummy data with Composite column
> Family like anuniqueIDGenerate:timestamp for example or
> anuniqueIDGenerate:stringdate where date is a string with dornat YYY-MM-dd
> for example
> >
> > Another option is use Supercolumn family by day for example ad try to
> use slice with this feature
> >
> >
> > Or another option is create a custom load cassandra but perhaps It´s
> more complex and I could this features.
> >
> > I will appreciate any help or example how I must define cassandra data
> and Pig example load with slice.
> >
> > Thanks in advance and king regards
> >
> >
> >
>
>
Re: Pig load data with cassandrastorage and slice filter param
Posted by aaron morton <aa...@thelastpickle.com>.
Not sure I understand the question. What was the command that failed?
Cheers
-----------------
Aaron Morton
Cassandra Consultant
New Zealand
@aaronmorton
http://www.thelastpickle.com
On 16/07/2013, at 11:03 PM, Miguel Angel Martin junquera <mi...@gmail.com> wrote:
> hi all
>
> I trying to load data from cassandra with slice params option but ther are no much info about how to use i. I found only a quick reference in readme.txt in cassandra project .../examples/pig
>
> ...
> Slices on columns can also be specified:
> grunt> rows = LOAD 'cassandra://MyKeyspace/MyColumnFamily?slice_start=C2&slice_end=C4&limit=1&reversed=true' USING CassandraStorage();
> Binary values for slice_start and slice_end can be escaped such as '\u0255'
> ...
>
>
> I want to filter the initial load data by day o range dates and I only found this info about cassandra and pig
>
> • http://rubyscale.com/blog/2011/03/06/basic-time-series-with-cassandra/
> • http://www.datastax.com/dev/blog/advanced-time-series-with-cassandra
>
>
> I,m going to try to do a test with dummy data with Composite column Family like anuniqueIDGenerate:timestamp for example or anuniqueIDGenerate:stringdate where date is a string with dornat YYY-MM-dd for example
>
> Another option is use Supercolumn family by day for example ad try to use slice with this feature
>
>
> Or another option is create a custom load cassandra but perhaps It´s more complex and I could this features.
>
> I will appreciate any help or example how I must define cassandra data and Pig example load with slice.
>
> Thanks in advance and king regards
>
>
>