【问题标题】:In Hive metastore db, How can I get the update_time of alter table在 Hive Metastore db 中,如何获取 alter table 的 update_time
【发布时间】:2017-08-22 16:11:08
【问题描述】:

我已经像这样使用“alter table”更改了 Hive 中的表。

alter table tbl_name add columns (...);
alter table tbl_name change col1 col2 string comment 'test';

在Hive Metastore数据库的表TBLS中,只记录了该表的create_time。如何获取alter table的更新时间。

【问题讨论】:

    标签: mysql hive metastore


    【解决方案1】:

    使用下面的命令

    desc 格式化的 tbl_name

    并寻找 last_modified_time

    它会告诉你上次更新的时间。 它将在 unixtimestamp 中。

    【讨论】:

    • 非常感谢。我想知道今天修改了哪些表。先“show tables”得到所有的表,然后用这个命令一个一个的过滤last_modified_time,有什么简单的方法吗?
    猜你喜欢
    • 2017-06-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-08-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-01-14
    相关资源
    最近更新 更多