Skip to content

IMPORT ​

If you used the Export command, you might want to import your data back as a restoration method, or as a migration method into another Indexima warehouse

Syntax ​

Import the entirety of an export

sql
IMPORT ALL FROM <backup_folder> [FORMAT CSV SEPARATOR ';|,|\t']

Import only a schema

sql
IMPORT SCHEMA|DATABASE <schema_name> FROM <backup_folder> [FORMAT CSV SEPARATOR ';|,|\t']

Import only a table

sql
IMPORT TABLE <schema_name>.<table_name> FROM <backup_folder> [FORMAT CSV SEPARATOR ';|,|\t']

Parameters ​

Parameter nameDescriptionPossible values
schema_name

The name of the schema you want to import into your warehouse. This refers to the name of the schema as described in the export files. The schema in the warehouse will automatically be named the same

my_schema
table_nameThe name of the table you want to import into your warehouse. This refers to the name of the table as described in the export files. The table in the warehouse will automatically be named the samemy_table
backup_folderThe folder that contains all the exported file. This folder must be accessible and readable by the master node. You can import a folder directly fro AWS S3 if needed.

/tmp/indexima_export

s3://my_bucket/indexima_export

INFO

When importing a table, note that you can change the table name by specifying the folder of the original table

text
EXPORT TABLE myschema.mytable1 TO '<backup_folder>' [ONLY_METADATA];
text
IMPORT TABLE myschema.mytable2 FROM '<backup_folder>/myschema/mytable1' ;

:::