Support Questions

Find answers, ask questions, and share your expertise

How to arhive hive external tables?

New Contributor

Hi Guys,

Is there a way to check hive external tables which are created N days before and drop those tables along with underlying hdfs data. Can this be achieved in unix script?

1 REPLY 1

Super Guru

@Rohit Sinha

We can run

Desc formatted <db_name>.<tab_name>;

then extract CreateTime value in your shell script, to get when was the table is created and then make a decision to drop the table (or) not.

If you have external table then follow this way to drop the table with hdfs data.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.