Re: Unit testing macros

2016-09-30 Thread Per Ullberg
We ran in to the same issue with oozie hive actions not sharing sessions. We went for the concatenation approach. We have a java action before the hive action that reads all hql files from a specification and concatenates these into one long hql script. We also add some sugar at this point by

Re: Unit testing macros

2016-09-30 Thread Staņislavs Rogozins
> > Have you taken a look at https://github.com/klarna/HiveRunner? I assume you're referring to this: https://github.com/klarna/HiveRunner/blob/ef14a1c181be863cec2278aeb732d9 e21c38a2b3/src/test/java/com/klarna/hiverunner/MacroTest.java It appears to execute the macro creation statement as part

Re: Unit testing macros

2016-09-30 Thread Elliot West
Hi, You can achieve this by storing the macro definition in a separate HQL file and 'import' this as needed. Unfortunately such imports are interpreted by your Hive client and the relevant command varies between client implementations: '!run' in Beeline and 'SOURCE' in Hive CLI. I raised a

Re: Unit testing macros

2016-09-30 Thread Per Ullberg
Have you taken a look at https://github.com/klarna/HiveRunner? regards /Pelle On Fri, Sep 30, 2016 at 11:23 AM, Staņislavs Rogozins < stanislavs.rogoz...@gmail.com> wrote: > The Unit testing wiki page > > suggests > using