hadoop - Apache Hive: Transferring data from existing table to another table -
i have multiple existing tables stored in hdfs. create new tables existing external tables can bucket, sort, , compress data.
what proper way create table existing table? export existing table csv, create new table , import seems there should way import data directly existing table haven't found in documentation or via google.
for existing table named: source
, newly created table named: target
fields: a,b,c,d
reading entries source , writing target:
insert overwrite table target select distinct a,b,c,d source;
this works both internal , external tables.
Comments
Post a Comment