Support Questions

Find answers, ask questions, and share your expertise

Error 10004 while doing Sandbox HDP Tutorial

avatar
Explorer

Hi. I am working through this tutorial:

https://hortonworks.com/tutorial/hadoop-tutorial-getting-started-with-hdp/section/3/

When I execute this HQL:

CREATE TABLE truck_mileage STORED AS ORC AS SELECT truckid, driverid, rdate, miles, gas, miles / gas mpg FROM trucks LATERAL VIEW stack(54, 'jun13',jun13_miles,jun13_gas,'may13',may13_miles,may13_gas,'apr13',apr13_miles,apr13_gas,'mar13',mar13_miles,mar13_gas,'feb13',feb13_miles,feb13_gas,'jan13',jan13_miles,jan13_gas,'dec12',dec12_miles,dec12_gas,'nov12',nov12_miles,nov12_gas,'oct12',oct12_miles,oct12_gas,'sep12',sep12_miles,sep12_gas,'aug12',aug12_miles,aug12_gas,'jul12',jul12_miles,jul12_gas,'jun12',jun12_miles,jun12_gas,'may12',may12_miles,may12_gas,'apr12',apr12_miles,apr12_gas,'mar12',mar12_miles,mar12_gas,'feb12',feb12_miles,feb12_gas,'jan12',jan12_miles,jan12_gas,'dec11',dec11_miles,dec11_gas,'nov11',nov11_miles,nov11_gas,'oct11',oct11_miles,oct11_gas,'sep11',sep11_miles,sep11_gas,'aug11',aug11_miles,aug11_gas,'jul11',jul11_miles,jul11_gas,'jun11',jun11_miles,jun11_gas,'may11',may11_miles,may11_gas,'apr11',apr11_miles,apr11_gas,'mar11',mar11_miles,mar11_gas,'feb11',feb11_miles,feb11_gas,'jan11',jan11_miles,jan11_gas,'dec10',dec10_miles,dec10_gas,'nov10',nov10_miles,nov10_gas,'oct10',oct10_miles,oct10_gas,'sep10',sep10_miles,sep10_gas,'aug10',aug10_miles,aug10_gas,'jul10',jul10_miles,jul10_gas,'jun10',jun10_miles,jun10_gas,'may10',may10_miles,may10_gas,'apr10',apr10_miles,apr10_gas,'mar10',mar10_miles,mar10_gas,'feb10',feb10_miles,feb10_gas,'jan10',jan10_miles,jan10_gas,'dec09',dec09_miles,dec09_gas,'nov09',nov09_miles,nov09_gas,'oct09',oct09_miles,oct09_gas,'sep09',sep09_miles,sep09_gas,'aug09',aug09_miles,aug09_gas,'jul09',jul09_miles,jul09_gas,'jun09',jun09_miles,jun09_gas,'may09',may09_miles,may09_gas,'apr09',apr09_miles,apr09_gas,'mar09',mar09_miles,mar09_gas,'feb09',feb09_miles,feb09_gas,'jan09',jan09_miles,jan09_gas ) dummyalias AS rdate, miles, gas;

I get this error:

org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: SemanticException [Error 10004]: Line 1:148 Invalid table alias or column reference 'jun13_miles': (possible column names are: column1, column2, column3, ...

I'm not familiar with the STACK function, so I'm having a lot of trouble debugging this.

I'm running the Sandbox exercises in HDP 2.6.4.

Can anyone see what the problem might be?

Thanks.

1 ACCEPTED SOLUTION

avatar
Super Collaborator

Please take a look at answer for similar issue: https://community.hortonworks.com/comments/175788/view.html

It is likely that you forgot to check first row header during the New Table -> Upload Table process

View solution in original post

7 REPLIES 7

avatar
Super Collaborator

Could you share information about your environment?

I was successful in creating the table using your DDL using HDP 2.6.4 sandbox on VirtualBox Version 5.1.26 r117224 (Qt5.6.2) for Mac.

My "sandbox-version" output is:
Sandbox information:

Created on: 01_02_2018_10_47_41 
Hadoop stack version:  Hadoop 2.7.3.2.6.4.0-91
Ambari Version: 2.6.1.0-143 
Ambari Hash: 2989989d67edacff7e9db702b4cf0c080556dddc
Ambari build:  Release : 143
Java version:  1.8.0_161 
OS Version:  CentOS release 6.9 (Final)

avatar
Explorer

I'm running on a Mac mini in OSX 10.10.5 with 4gb of memory assigned to VirtualBox. VirtualBox version is 5.2.6 r120293 (Qt5.6.3)

Here is my sandbox-version info:

Sandbox information:
Created on: 01_02_2018_10_47_41
Hadoop stack version:  Hadoop 2.7.3.2.6.4.0-91
Ambari Version: 2.6.1.0-143
Ambari Hash: 2989989d67edacff7e9db702b4cf0c080556dddc
Ambari build:  Release : 143
Java version:  1.8.0_161
OS Version:  CentOS release 6.9 (Final)

avatar
Super Collaborator
@Dave

, minimum requirements are 8GB of RAM - see deployment guide

avatar
Explorer

Right, thanks, I missed that. I will upgrade the memory and report back. Cheers.

avatar
Explorer

I have upgraded RAM, and also upgraded the OS, so I am now running OSX 10.13.3 with 16GB of RAM, and 8GB assigned to my sandbox.

I am still getting this error. Anything else I should check?

avatar
Super Collaborator

Please take a look at answer for similar issue: https://community.hortonworks.com/comments/175788/view.html

It is likely that you forgot to check first row header during the New Table -> Upload Table process

avatar
Explorer

Sorry for the delayed response on this. You were right, I did indeed forget to check that box. I reloaded the tables and with that box checked, and the HQL ran correctly.

Thank you!