You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/migration/migration-from-hive.md
+38-74Lines changed: 38 additions & 74 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,59 +30,41 @@ Apache Hive supports ORC, Parquet file formats that could be migrated to Paimon.
30
30
When migrating data to a paimon table, the origin table will be permanently disappeared. So please back up your data if you
31
31
still need the original table. The migrated table will be [append table]({{< ref "append-table/overview" >}}).
32
32
33
-
Now, we can use paimon hive catalog with Migrate Table Procedure and Migrate File Procedure to totally migrate a table from hive to paimon.
33
+
Now, we can use paimon hive catalog with Migrate Table Procedure to totally migrate a table from hive to paimon.
34
34
At the same time, you can use paimon hive catalog with Migrate Database Procedure to fully synchronize all tables in the database to paimon.
35
35
36
36
* Migrate Table Procedure: Paimon table does not exist, use the procedure upgrade hive table to paimon table. Hive table will disappear after action done.
37
37
* Migrate Database Procedure: Paimon table does not exist, use the procedure upgrade all hive tables in database to paimon table. All hive tables will disappear after action done.
38
-
* Migrate File Procedure: Paimon table already exists, use the procedure to migrate files from hive table to paimon table. **Notice that, Hive table will also disappear after action done.**
39
38
40
39
These three actions now support file format of hive "orc" and "parquet" and "avro".
41
40
42
41
<spanstyle="color: red; "> **We highly recommend to back up hive table data before migrating, because migrating action is not atomic. If been interrupted while migrating, you may lose your data.** </span>
Copy file name to clipboardExpand all lines: paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/procedure/MigrateTableProcedure.java
Copy file name to clipboardExpand all lines: paimon-hive/paimon-hive-connector-common/src/test/java/org/apache/paimon/hive/procedure/MigrateFileProcedureITCase.java
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -103,11 +103,11 @@ public void test(String format, boolean isNamedArgument) throws Exception {
103
103
"CREATE TABLE paimontable (id STRING, id2 INT, id3 INT) PARTITIONED BY (id2, id3) with ('bucket' = '-1');");
Copy file name to clipboardExpand all lines: paimon-spark/paimon-spark-common/src/main/java/org/apache/paimon/spark/procedure/MigrateTableProcedure.java
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -96,6 +96,9 @@ public InternalRow[] call(InternalRow args) {
0 commit comments