Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to see the date when the table was created?

Tags:

hive

hiveql

I have created a table couple months ago. Is there any way in HIVE that I can see when was the table created?

show table doesn't give the date creation of the table.

like image 350
sharp Avatar asked Jun 01 '15 13:06

sharp


People also ask

How can I tell when a SQL Developer table was created?

SELECT object_name,created FROM user_objects WHERE object_name LIKE '%table_name%' AND object_type = 'TABLE'; Note: Replace '%table_name%' with the table name you are looking for.

How do you check when was the mysql database created?

SELECT create_time FROM INFORMATION_SCHEMA. TABLES WHERE table_schema = 'yourDatabaseName' AND table_name = 'yourTableName'; My table name is 'skiplasttenrecords' and database is 'test'.


2 Answers

Execute the command desc formatted <database>.<table_name> on the hive cli. It will show detailed table information similar to

Detailed Table Information

Database:
Owner:
CreateTime:
LastAccessTime:

like image 139
Phani Kumar Avatar answered Sep 21 '22 23:09

Phani Kumar


You need to run the following command:

describe formatted <your_table_name>;

Or if you need this information about a particular partition:

describe formatted <your_table_name> partition (<partition_field>=<value>);
like image 24
Vitaliy Bashun Avatar answered Sep 24 '22 23:09

Vitaliy Bashun