Home > other >  Hive operating table
Hive operating table

Time:02-24

- insert a table
Insert into dm. PLAN_ES_D PARTITION (statis_date='20191106')
Values
Dc0163000550d0240001 (' 107423328 ', '2.0', 'A002', 'tyrt', 'S01', 'ert', '1', '1')

- insert a data table (will clear the table first, then insert)
Insert the overwrite table dm. T_DW_D PARTITION (statis_date='20191106')
Values
Dc0163000550d0240001 (' 107423328 ', '2.0', 'A002', 'tyrt', 'S01', 'ert', '1', '1')

- insert a data using the virtual table
Insert the OVERWRITE table dm. T_DWD_D PARTITION (statis_date='20191106')
Select '107423328 dc0163000550d0240001', '2.0', 'A002', 'tyrt', 'S01', 'ert', '1', '1' from dual


- add a partition to table
The alter table dm. T_DWD_SCN_PS_D add partition (statis_date='20191105')

- see table field
Desc dm. T_DWD_SCN_PS_D

- see table partitioning
Show partitions dm. T_DWD_SCN_PS_D
  • Related