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
import all
IMPORT ALL FROM <backup_folder> [FORMAT CSV SEPARATOR ';|,|\t']
Import only a schema
Import schema
IMPORT SCHEMA|DATABASE <schema_name> FROM <backup_folder> [FORMAT CSV SEPARATOR ';|,|\t']
Import only a table
Import table
IMPORT TABLE <schema_name>.<table_name> FROM <backup_folder> [FORMAT CSV SEPARATOR ';|,|\t']
Parameters
Parameter name | Description | Possible 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_name | The 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 same | my_table |
backup_folder | The 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 |
When importing a table, note that you can change the table name by specifying the folder of the original table
Export mytable1
EXPORT TABLE myschema.mytable1 TO '<backup_folder>' [ONLY_METADATA];
Import as Mytable2
IMPORT TABLE myschema.mytable2 FROM '<backup_folder>/myschema/mytable1' ;