【问题标题】:Delete query in treasure-data/hadoop?删除 Treasure-data/hadoop 中的查询?
【发布时间】:2013-04-18 10:57:58
【问题描述】:

我尝试编写一个查询来删除 Treasure-data 中的一些行,但服务器忽略了它。我缺少解决此问题的文档。

这是日志:

    Use 'td job:show 2485728' to show the status.
queued...
  started at 2013-04-18T10:22:32Z
  Hive history file=/mnt/hive/tmp/2073/hive_job_log__336863980.txt
  finished at 2013-04-18T10:22:39Z
  Ignored "delete from mytable where time < unix_timestamp() - 30*60*60*24"

【问题讨论】:

    标签: sql hadoop hive bigdata


    【解决方案1】:

    抱歉,HIVE 中没有删除语句。一种可能的技巧是重写表格:

    INSERT OVERWRITE TABLE mytable
    SELECT * FROM mytable
    WHERE time >= unix_timestamp() - 30*60*60*24
    

    【讨论】:

      猜你喜欢
      • 2016-11-23
      • 1970-01-01
      • 2023-03-26
      • 1970-01-01
      • 1970-01-01
      • 2017-10-04
      • 2013-11-13
      • 2016-11-30
      • 1970-01-01
      相关资源
      最近更新 更多