Re: Create table with parameterized location

2016-06-22 Thread Per Ullberg
Try to skip the spaces when doing the set.

You can execute 'set;' to verify that rootpath is set as expected.

/Pelle

On Wednesday, June 22, 2016,  wrote:

> Hello,
> I've tried something like the following
>
> set rootpath = 'hdfs_path';
> DROP TABLE mytable;
> CREATE [EXTERNAL] TABLE mytable (
>  Dim1 STRING,
>  Dim2 STRING,
>  Dim3 STRING )
>  LOCATION ${hiveconf:rootpath};
>
> I get this error:
>
>
> FAILED: ParseException line 1:126 mismatched input '' expecting
>  StringLiteral near 'LOCATION' in table location specification
>
> I am using Hive 1.1.0 with Cloudera 5.4.8.
>
> Does anyone have an idea how to solve this?
>
> All the best,
>
> Yonathan
>
>

-- 

*Per Ullberg*
Tech Lead
Odin - Uppsala

Klarna AB
Sveavägen 46, 111 34 Stockholm
Tel: +46 8 120 120 00
Reg no: 556737-0431
klarna.com


Re: Oozie error with pig

2016-06-22 Thread Peter Cseh
Hi,

There are several parameters defined in the workflow (${app_name},
${start_time} etc.).
All of them should have defined values at the time of workflow submission.
>From the message it seems like some of the parameters are not defined in
the coordinator job.

Regards,
Peter


On Wed, Jun 22, 2016 at 2:35 AM, M Gates  wrote:

>
> Hi
>
> Looking for some help with Oozie and Pig. I have the setup below but keep
> getting the error below:  'The application does not define formal
> parameters in its XML definition’.
>
>
> I have my test.pig script in hdfs with the workflow.xml - any idea what I
> am missing in the scripts below or what might cause this error?
>
> Thanks,
> Mark G.
>
>
> Workflow.xml
>
>
>  xmlns="uri:oozie:workflow:0.4">
> 
>
> 
> 
>
> ${jobTracker}
>
> ${nameNode}
> 
>  path="${hdfs_temp_dir}/pig"/>
> 
> 
> 
>
>   mapred.compress.map.output
>
>   true
> 
> 
>
>   mapred.job.queue.name
>
>   ${queueName}
> 
> 
> test.pig
>
> -useHCatalog
> -param
>
> output=${hdfs_temp_dir}/pig
> 
> 
> 
> 
>
> 
> Pig failed, error
> message[${wf:errorMessage(wf:lastErrorNode())}]
> 
>
> 
> 
>
>
> Coordinator.xml
>
>
>  frequency="${coord:days(1)}"
> start="${start_time}"
> end="${end_time}"
> timezone=“America/Montreal"
> xmlns="uri:oozie:coordinator:0.2">
> 
> 1
> FIFO
> 
>
> 
> 
>
> ${app_path}/workflow
> 
> 
>
>   nominal_time
>
>   ${coord:nominalTime()}
> 
> 
> 
> 
> 
>
>
> Log Output:
>
>
> 2016-06-21 19:33:16,766  INFO CoordMaterializeTransitionXCommand:543 -
> SERVER[hadoop.oss.ads] USER[markg] GROUP[-] TOKEN[]
> APP[customer_journey_event_app] JOB[0002430-160613201309706-oozie-oozi-C]
> ACTION[-] [0002430-160613201309706-oozie-oozi-C]: all actions have been
> materialized, set pending to true
> 2016-06-21 19:33:16,766  INFO CoordMaterializeTransitionXCommand:543 -
> SERVER[hadoop.oss.ads] USER[markg] GROUP[-] TOKEN[]
> APP[customer_journey_event_app] JOB[0002430-160613201309706-oozie-oozi-C]
> ACTION[-] Coord Job status updated to = RUNNING
> 2016-06-21 19:33:16,870  INFO CoordActionNotificationXCommand:543 -
> SERVER[hadoop.oss.ads] USER[-] GROUP[-] TOKEN[-] APP[-]
> JOB[0002430-160613201309706-oozie-oozi-C]
> ACTION[0002430-160613201309706-oozie-oozi-C@1] STARTED Coordinator
> Notification actionId=0002430-160613201309706-oozie-oozi-C@1 : WAITING
> 2016-06-21 19:33:16,871  INFO CoordActionNotificationXCommand:543 -
> SERVER[hadoop.oss.ads] USER[-] GROUP[-] TOKEN[-] APP[-]
> JOB[0002430-160613201309706-oozie-oozi-C]
> ACTION[0002430-160613201309706-oozie-oozi-C@1] No Notification URL is
> defined. Therefore nothing to notify for job
> 0002430-160613201309706-oozie-oozi-C action ID
> 0002430-160613201309706-oozie-oozi-C@1
> 2016-06-21 19:33:16,871  INFO CoordActionNotificationXCommand:543 -
> SERVER[hadoop.oss.ads] USER[-] GROUP[-] TOKEN[-] APP[-]
> JOB[0002430-160613201309706-oozie-oozi-C]
> ACTION[0002430-160613201309706-oozie-oozi-C@1] ENDED Coordinator
> Notification actionId=0002430-160613201309706-oozie-oozi-C@1
> 2016-06-21 19:33:34,573  INFO CoordActionInputCheckXCommand:543 -
> SERVER[hadoop.oss.ads] USER[-] GROUP[-] TOKEN[-] APP[-]
> JOB[0002430-160613201309706-oozie-oozi-C]
> ACTION[0002430-160613201309706-oozie-oozi-C@1]
> [0002430-160613201309706-oozie-oozi-C@1]::CoordActionInputCheck:: Missing
> deps:
> 2016-06-21 19:33:34,619  WARN ParameterVerifier:546 -
> SERVER[hadoop.oss.ads] USER[-] GROUP[-] TOKEN[-] APP[-]
> JOB[0002430-160613201309706-oozie-oozi-C]
> ACTION[0002430-160613201309706-oozie-oozi-C@1] The application does not
> define formal parameters in its XML definition
> 2016-06-21 19:33:54,696