This documentation is for an unreleased version of Apache Paimon. We recommend you use the latest stable version.
Clone To Paimon
Clone To Paimon #
Clone supports cloning tables to Paimon tables.
- Clone is
OVERWRITE
semantic that will overwrite the partitions of the target table according to the data. - 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:
- 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:
- Clone Hudi tables in Hive Catalog to Paimon Catalog, target table will be append table.
- 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