sql server - preserve the data while dropping a hive internal table -


i have loaded huge table sql server onto hive. mistake made created table internal table in hive. can suggest hack can alter table structure , without dropping data. data huge , cant afford export data out of source again.

the problem right now, since column orders don't match sql server table, lot of columns display null.

any highly appreciated.

i not see problem use alter table on internal table. (https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#languagemanualddl-altertable/partition/column)

another - not recommended - option open hive metastore(hcatalog) , apply changes there. hive reads out schema information relational database (configured during hadoop setup, default mysql). in mysql can try change settings. however, not recommended mistake, can screw whole hive databases.

the safest way creating new table , using existing source

create table new_table select [...] existing_table 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -