thanks
2013/7/5 Pradeep Gollakota <[email protected]> > If it's just registering common jars and defining aliases for UDFs, I think > you can do think in .pigrc or in .pigbootup > > > On Fri, Jul 5, 2013 at 6:56 AM, Miguel Angel Martin junquera < > [email protected]> wrote: > > > hi all: > > I am using pig 0.11.1 and I want to modularize my pig scripts. > > I want to have a file with all commons register libraries and functions > > defines and import or inlude in other scripts. > > > > I try with macro feature but I have and error > > > > This is the scenario. > > > > I have a file *common.pig *with some register libraries: > > > > * > > * > > > > *register > > > > > '/home/parallels/Escritorio/dev/libsCassandraPig/elephant-bird-pig-3.0.7.jar'; > > * > > * > > * > > *define JsonStringToMap > > com.twitter.elephantbird.pig.piggybank.JsonStringToMap();* > > > > > > > > and in another pig script file for example myImportScritp.pig , I trying > > import common.pig: > > > > > > *import 'common.pig';* > > * > > * > > *...* > > * > > * > > * > > * > > > > I have this error: > > > > 2013-07-05 12:51:47,211 [main] ERROR org.apache.pig.Main - ERROR 1200: > > <file .../pig_scripts/common_pig/common.pig, line 14, column 0> Syntax > > error, unexpected symbol at or near 'register' > > Details at logfile: pig_1373021505728.log > > > > .. > > > > Is this a bug or Macros Pig do not support this ? > > > > > > is there another way to do this ? > > > > > > > > Thanks in advance and regards. > > > > > > > > > > * > > * > > * > > * > > * > > * > > * > > * > > >
