All Products
Search
Document Center

:Export and import formats

Last Updated:Mar 29, 2023

OceanBase Developer Center (ODC) supports three data export modes: Export Schema and Data, Export Data Only, and Export Schema Only. A schema is the DDL file of an exported object, while data is the data file stored in the object. The types of schemas and data files vary with the export and import formats.

ODC supports exporting data in CSV and SQL formats and importing ZIP, SQL (batch import), and CSV (single table import) files.

Export file formats

ODC exports data in a zip file, which contains the metadata file MANIFEST.bin, the schema definition files of the exported objects, and the data files.

When you create an export task, if you set Data Format to SQL Format, the zip file contains the schema definition files named in the pattern of object_name-schema.sql and data files named in the pattern of object_name.sql. The object names are the same as those of the objects in the database.

Image 614

If you set Data Format to CSV Format, the zip file contains the schema definition files named in the pattern of object name-schema.sql and data files named in the pattern of object name.csv. The object names are the same as those of the objects in the database.

Image 613

Import file formats

ODC supports importing ZIP (batch import and single table import), SQL (batch import), and CSV (single table import) files.

The ZIP file here is a compressed package that is suffixed with .zip. When you create an import task, if you select ZIP Files as the Import Content, you must specify whether Data Format in the zip file is CSV Format or SQL Format. For more information about the content of different formats of files to be exported, see Export file formats.

SQL files supported for batch data import are suffixed with .sql and contain statements that can be directly executed in the database. These statements include SELECT, INSERT, UPDATE, DELETE, CREATE, and DROP.

CSV files supported for single table import are data files that are suffixed with .csv or .txt. These files support custom delimiters.