如何创建类似avro的表?

drkbr07n  于 2021-06-26  发布在  Hive
关注(0)|答案(0)|浏览(145)

我基于另一个表(test)的模式创建了一个表(test\u load)。然后我将test\u load插入到另一个表中。

drop table if exists test_load;
create external table test_load
like test
location /test_load_folder;

insert into warehouse
select * from test_load;

当一切都在Parquet地板上时,它工作得很好。然后,我将我的测试模式演化为avro,并重新创建了我的测试加载表,但当我尝试插入到仓库中时,我收到一个错误:

Error while processing statement: FAILED: Execution Error, return code 2 
from org.apache.hadoop.hive.ql.exec.mr.MapRedTask

我正在寻找好的语法来重新创建load表并指定它的avro。我的假设是,Hive仍然考虑其Parquet文件。
我试过了

drop table if exists test_load;
create external table test_load
like test
location /test_load_folder
stored as avro;

但我有个语法错误。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题