Unit testing macros

2016-09-30 Thread Staņislavs Rogozins
The Unit testing wiki page suggests using macros to 'extract and resuse the expressions applied to columns' and that they can be 'readily isolated for testing'. However as far as I'm aware, right now only temporary macros can

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

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

Hive streaming data ingest api Invalid method name: 'get_all_functions'

2016-09-30 Thread Eva Donaldson
I am having the worst time of tracking this down and figured it made it officially time to join the real club! I am using the Hive Streaming Data Ingest API as detailed herehttps://cwiki.apache.org/confluence/display/Hive/Streaming+Data+Ingest. On beginning the new batch when it gets to