Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Add new Columns in Kudu Tables from Impala

avatar
Contributor

Hi Folks,
After adding new columns in Kudu tables from impala, I had some issues computing stats for this table. Everything works fine until the Compute Stats command;

The alter table command 

 

ALTER TABLE myschema.mytable ADD COLUMNS (mycolumn TIMESTAMP DEFAULT now());

 

 

The issue when Compute Stats command.

 

ImpalaRuntimeException: Error making 'updateTableColumnStatistics' RPC to Hive Metastore: CAUSED BY: MetaException: Column mycolumn doesn't exist in table mytable in database myschema

 

 

Someone can help me, please?

1 ACCEPTED SOLUTION

avatar
Contributor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
5 REPLIES 5

avatar
Master Mentor

@Guarupe 
I responded to a similar question Warm up Impala
You will need to run the  INVALIDATE METADATA [[db_name.]table_name]
The error is precise Impala uses the Hive Metastore  [HMS] to build efficient queries

 

 

CAUSED BY: MetaException: Column mycolumn doesn't exist in table mytable in database myschema

 

 

In your case INVALIDATE METADATA [[myschema.]mytable] 
The INVALIDATE METADATA is an asynchronous operation that simply discards the loaded metadata from the catalog and coordinator caches. After that operation, the catalog and all the Impala coordinators only know about the existence of databases and tables and nothing more. Metadata loading for tables is triggered by any subsequent queries.

 

After running this in the impala-shell you should compute statistics successfully

Happy hadooping

avatar
Contributor

Hi Shelton,
Thanks for your reply, but INVALIDATE METADATA didn't work for me. I still have the same error. My option was to recreate the table with a CREATE TABLE as SELECT from the previous table.
Thanks again

avatar
Master Mentor

@Guarupe 
Can you share your steps, please? Are you suing HUE to run your cmds? Did you use the Impala editor?

avatar
Contributor

Hi Shelton,

The answer to all questions is yes. I'm using the Hue Impala Editor and all these commands were issued by HUE. As I've already solved the problem with a CREATE AS SELECT, I'm going to ask for a little time to simulate this problem again.

Thanks again,

avatar
Contributor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login