【发布时间】:2020-08-02 04:19:23
【问题描述】:
在Beeline中,我使用“create table new_table_name as select * from exists_name”创建新表,表创建成功,但是没有数据。当我使用相同的“select * from exists_name”创建临时表时,临时表有数据。
直线版本是Beeline version 3.1.0.3.1.5.0-152 by Apache Hive
【问题讨论】:
-
您的确切创建 SQL 是什么?因为直线/命令工具有时不会创建正确的模式。你用过像
create table target_db.new_table_name as select * from source_db.exists_name -
是的,我尝试使用
create table target_db.new_table_name as select * from source_db.exists_name。它也没有用 -
你有没有收到这样的工作总结消息 -
INFO : Execution completed successfully INFO : Moving data to: hdfs://loc/tmp from hdfs://db-ns/ sw/schema/.hive-staging_hive_2020-08-03_00-58-40_904_7739683806805718609-35074 INFO : Starting task [Stage-2:STATS] in serial mode INFO : Table schema.tmp stats: [numFiles=2, numRows=2414, total Size=450056, rawDataSize=447642] INFO : Completed executing command(queryId=hive_20200803005858_123d8faf-df00-4e4b-9ba5-2b91858a7b54); Time taken: 102.659 seconds INFO : OK No rows affected (103.867 seconds)