Clone To Paimon
This documentation is for an unreleased version of Apache Paimon. We recommend you use the latest stable version.

Clone To Paimon #

Clone supports cloning tables to Paimon tables.

  1. Clone is OVERWRITE semantic that will overwrite the partitions of the target table according to the data.
  2. Clone is reentrant, but it requires existing tables to contain all fields from the source table and have the same partition fields.

Currently, clone supports:

  1. Clone Hive tables in Hive Catalog to Paimon Catalog, supports Parquet, ORC, Avro formats, target table will be append table.

The source table below is currently under development:

  1. Clone Hudi tables in Hive Catalog to Paimon Catalog, target table will be append table.
  2. Clone Paimon tables to Paimon tables, target table can be primary table or append table.

Clone Hive Table #

<FLINK_HOME>/flink run ./paimon-flink-action-1.2-SNAPSHOT.jar \
clone \
--database default \
--table hivetable \
--catalog_conf metastore=hive \
--catalog_conf uri=thrift://localhost:9088 \
--target_database test \
--target_table test_table \
--target_catalog_conf warehouse=my_warehouse \
--parallelism 10 \
--where <filter_spec>

You can use filter spec to specify the filtering condition for the partition.

Clone Hive Database #

<FLINK_HOME>/flink run ./paimon-flink-action-1.2-SNAPSHOT.jar \
clone \
--database default \
--catalog_conf metastore=hive \
--catalog_conf uri=thrift://localhost:9088 \
--target_database test \
--parallelism 10 \
--target_catalog_conf warehouse=my_warehouse
Edit This Page
Copyright © 2024 The Apache Software Foundation. Apache Paimon, Paimon, and its feather logo are trademarks of The Apache Software Foundation.