Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Pig >> mail # user >> Setting the store file name with date


Copy link to this message
-
Re: Setting the store file name with date
I don't think version is a problem. variables is probably supported from the
start of the Pig.

Using

    STORE result INTO 'out-$date';

I mentioned about, when you run the pig script, you just add "-param
date=20110522'" to your command line. What is the problem you see?

2011/5/21 Renato Marroquín Mogrovejo <[EMAIL PROTECTED]>

> Thanks Dexin! I tried that but that did not work for me. I am using
> Pig 0.7, what version of Pig do you use?
> Yeah I think I could move it aside, but the problem is that I need to
> keep track of the results, and if I move them aside then I would have
> to rename the results of each job sequentially because my jobs can
> repeat many times, but their results are different.
> Thanks again.
>
> Renato M.
>
> 2011/5/20 Dexin Wang <[EMAIL PROTECTED]>:
> > Yeah I do that all the time.
> >
> > STORE result INTO 'out-$date';
> >
> > Or you could run the pig script then after it's done move the result
> aside.
> >
> >
> > On May 20, 2011, at 6:51 PM, Renato Marroquín Mogrovejo<
> [EMAIL PROTECTED]> wrote:
> >
> >> Hi, I have a sequence of jobs which are run daily and usually the logs
> >> and results are erased every time they have to be re-run. Now we want
> >> to keep those logs and results, but if the results already exist, the
> >> pig job fails. I thought that maybe setting the results' name + date
> >> would solve it for me. Can I do that from pig? Do you guys have any
> >> other suggestions?
> >> Thanks in advance.
> >>
> >>
> >> Renato M.
> >
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB