【问题标题】:is there any issue in select query after executing delete query in presto cli?在 presto cli 中执行删除查询后,选择查询有什么问题吗?
【发布时间】:2020-03-15 19:05:36
【问题描述】:

我有 presto hive 和 hdfs 设置,并且我有一个表 customer,其中包含数据(数据存储在 hdfs 位置 /presto/customer.avro)。

hive 表也有模式和元数据信息。 在 presto cli 中执行 select * 查询时,它会给出所有插入的 3 条记录;

在执行从客户删除时;在 presto cli 中所有数据都被删除。

再次在持久化数据时,它会反映在 hdfs 客户文件中,但 presto select * query show no records.

【问题讨论】:

  • 你的问题到底是什么?
  • 在 presto_cli 中执行 delete from table_name 查询后 select * 查询是否有效

标签: hive hdfs presto


【解决方案1】:

如果你已经创建了一个外部表,那么 delete 命令只会从 Metastore 中删除该表,并且不会删除底层文件。 在此处查看与外部表相关的属性https://trino.io/docs/current/connector/hive.html

【讨论】:

    猜你喜欢
    • 2021-05-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-01-30
    • 1970-01-01
    • 2019-07-16
    • 2010-09-07
    • 2020-01-06
    相关资源
    最近更新 更多