This topic describes the file formats supported in data export and import in OceanBase Developer Center (ODC).
Background
You can export data in ODC in three modes: export data only, export schema and data, and export schema only. A schema is the DDL file of an object to be exported, while data is the record 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, and CSV files. SQL files are supported in batch import and CSV files are supported in single table import.
Export file formats
ODC exports data to a zip file, which contains the metadata file MANIFEST.bin, the schema definition files of the exported objects, and the data files.
Export data in the SQL format
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 format of object name-schema.sql and data files named in the format of object name.sql. The object names are the same as those of the objects in the database.
Export data in the CSV format
If you set Data Format to CSV Format, the zip file contains the schema definition files named in the format of object name-schema.sql and data files named in the format of object name.csv. The object names are the same as those of the objects in the database.
Import formats
You can import ZIP files and SQL files in ODC. ODC allows you to import a ZIP file that contains one or more files. If you want to import SQL files in ODC, you must import multiple files at a time.
Import ZIP files
A ZIP file here is a compressed package that is suffixed with .zip. When you create an import task, if you select ZIP Files for Import Content, you must specify whether Data Format is CSV Format or SQL Format for the zip file. For more information about the content of exported files in different formats in the ZIP file, see the Export file formats section in this topic.
Import SQL files
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.
Import CSV files
CSV files supported for single table import are data files suffixed with .csv or .txt. These files support custom delimiters.