For two tables in Hive:
Schema of Table A:
id name age
Schema of Table B:
name
# The type of "name" in Table A and B are both string
I want to select all rows from Table B
and then append them to Table A
, leaving the columns id
and age
null.
The following statement would not work since the number of columns are not identical
insert into Table_A
select * from Table_B
;
Is there any viable methods to append the data?
insert into table Table_A select null,name,null from Table_B;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With