Hi Zhao,

1) Just copying acid files from source to target won't work. it needs
associated metadata as well.

You can use REPL DUMP (at source) & REPL LOAD (at target) to copy ACID
tables from one cluster to another.

You can find more information in this doc.
https://hive.apache.org/docs/latest/hivereplicationv2development_66850051/#repl-dump

2) AFAIK, there is no direct way to move acid table data to non-acid
tables. You can do the following, but it needs ETL and makes 3 copies of
data.

   - create non-acid_table like acid_table stored as <required_format>;
   - insert into non-acid_table select * from acid_table;
   - distcp non-acid_table files from source to target
   - create a non-acid table using target cluster location.

---
Regards,
Naresh P R

On Tue, May 20, 2025 at 7:14 AM 243776...@qq.com <243776...@qq.com> wrote:

> Hi, Denys
>
> I want to know how to migrate the data of ACID tables between two
> HIVE-3.1.x clusters. Especially using "distcp" tools; I've tried it after
> compaction,but the new acid table cannot read data(There are no results
> after querying the table),I also have executed "msck repair table xxx"
>
> By the way, I have one other question, how to migrate transaction table to
> normal orc table(with no acid but stored as orc format)
>
> Thanks for your help.
> Regards,
> Zhao Wenbing
>
> ------------------------------
> 243776...@qq.com
>
>
> *From:* Denys Kuzmenko <dkuzme...@apache.org>
> *Date:* 2025-05-20 19:10
> *To:* user <user@hive.apache.org>
> *Subject:* Re: Migrating Hive 3 to Hive 4
> Hive 3 cannot read ACID tables created by Hive 4, as Hive 4 is forward
> compatible only, not backward compatible.
>
>

Reply via email to