11-07-2016 12:04 AM - last edited on 11-08-2016 06:00 AM by cjervis
I am unable to run the simple query on HIVE i.e. describe tablename; and getting the below error. Also when I tried to check it on hue it also give me the same error. Even Ive tried to do the same with admin user and it gives me the same error. can anybody help me here.
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. cannot find field lbs_retail_celleliste_jakntest from [0:id, 1:timestamp, 2:lid, 3:kundenr, 4:kundenavn, 5:gadenavn, 6:husnr, 7:postnr, 8:postdistrikt, 9:kisnr, 10:kismoder, 11:kismoder_navn, 12:sys34_x, 13:sys34_y, 14:celle_01_y, 15:celle_02, 16:celle_03, 17:celle_04, 18:celle_05, 19:celle_06, 20:celle_07, 21:celle_08, 22:celle_09, 23:celle_10, 24:utm_e, 25:utm_n]
11-07-2016 10:47 PM
Actually, when I tried to execute the describe query in HUE-Hive Editor, it executed fine. But when I tried to click table (on left panel of the HUE-Hive editor, in which we have to select database and below that we got list of tables), then it gives me the error.
Other tables in databases works fine when I tried to execute the same query (Both in query editor and left table list panel).
I hope It will clear it more.
11-16-2016 05:55 AM
I have tried to drop and recreate the same table. but still I am facing the same issue.
I have made same tables like issue database in temp database that is pointing to the same file directory as in issue database table. This table worked fine without any error and able to show data, describe data etc. Then I have made the same table in issue database with the same configuration but it gives us the same error that I am facing.
So I am facing this issue only in one database.
11-17-2016 09:09 PM
You can try this and let me know...
If you are using cloudera then use /user/hive/warehouse/
in case of Hortonworks distribution then replace it as follows: /apps/hive/warehouse/
Step1: Run the below command to see the file available in your hive table. Replace mydb with your dbname and mytable with your tablename
# hadoop fs -ls /user/hive/warehouse/mydb.db/mytable
Step2: Ex: if the above commands returns as follows: /user/hive/warehouse/mydb.db/mytable/000000_0
then run the below command. it will return last 10 records from your file.
# hadoop fs -tail /user/hive/warehouse/mydb.db/mytable/000000_0
Step3: You mentioned that you have create script. so compare the list of column from create script with one record from the above list
Step4: Make sure columns in create script matches with data (especially the problematic column lbs_retail_celleliste_jakntest)
11-17-2016 09:26 PM
I am giving one more option to you...
Note: You can hard code $ with actual path/file/table
05-23-2017 01:01 AM
Apologies for the late response. I've tried the above solution but they didt worked for me.
An after number of times I have found the resolution.
As database has a table with same name, due to that the problem is occuring.
We have a database test and in the same database we have a table test so Ive rename the table to test_2.
We have successfully recreated this problem and also resolved the same on in test cluster.
So thanks for the help and response.
05-20-2018 04:03 AM
I still not getting resolved with given resolution.
hive> create table departments(department_id int,department_name string)
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:Exception thrown when executing query : SELECT DISTINCT 'org.apache.hadoop.hive.metastore.model.MTable' AS `NUCLEUS_TYPE`,`A0`.`CREATE_TIME`,`A0`.`LAST_ACCESS_TIME`,`A0`.`OWNER`,`A0`.`RETENTION`,`A0`.`IS_REWRITE_ENABLED`,`A0`.`TBL_NAME`,`A0`.`TBL_TYPE`,`A0`.`TBL_ID` FROM `TBLS` `A0` LEFT OUTER JOIN `DBS` `B0` ON `A0`.`DB_ID` = `B0`.`DB_ID` WHERE `A0`.`TBL_NAME` = ? AND `B0`.`NAME` = ?)
Could you please help me to resolve this?