Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on 06-01-2017 12:16 PM - edited 08-17-2019 11:49 PM
Hi everyone, I'm trying to perform a grouping for a relation with the scheme below:
I have created a the group all for whole relation as:
total_station_trips_all = GROUP october ALL;
Finally I'm trying to get the counting for the column s_station from the scheme october like
Unfortunatelly I'm getting this error:
Please guys give me a light about this error i will appreciate so much.
Thanks so much.
AU
Created 06-02-2017 04:32 PM
You're not going to like it, but it is as simply as upper-casing "count" to be "COUNT". 😉
This brings up the larger issue around case-sensitivity in Pig. Generally, speaking case only really matters on alias names and things that end up being Java class names. Functions fall into that bucket, so just upper-case it and it'll work.
Additionally, you could simplify the code a bit to just do COUNT(october) instead of COUNT(october.s_station).
Good luck and happy Hadooping!
Created 06-02-2017 04:32 PM
You're not going to like it, but it is as simply as upper-casing "count" to be "COUNT". 😉
This brings up the larger issue around case-sensitivity in Pig. Generally, speaking case only really matters on alias names and things that end up being Java class names. Functions fall into that bucket, so just upper-case it and it'll work.
Additionally, you could simplify the code a bit to just do COUNT(october) instead of COUNT(october.s_station).
Good luck and happy Hadooping!
Created 06-05-2017 12:32 PM
thanks , tried and working. I have just to be more careful on my typing. I appriciate.
Created 06-07-2017 08:06 PM
Excellent. Truthfully, the case sensitivity is a bit weird in Pig -- kind of like the rules of the English language. Hehe!