Import / Export from Builtin Worker
A worker is integrated into metavault to import or export tables from any project environment to or from a CSV file in S3.
Only S3 file store is supported
Only CSV file format is supported
Example of an Export State Machine
The following State machine exports the table “persons” from the schema “stg” located in the environment “testenv” of the project “default” into a file named “persons.csv” of a S3 file store “minIO”.
{
"StartAt": "export",
"TimeoutSeconds": 3600,
"States": {
"export": {
"TimeoutSeconds": 3600,
"Type": "Task",
"Resource": "BulkImportExport",
"Parameters": {
"DatabaseSchema": "stg",
"DatabaseTable": "persons",
"StoreUrl": "s3://minio/persons.csv",
"Action": "Export",
"EnvironmentName": "testenv",
"ProjectName": "default"
},
"End": true
}
}
}
Example of an Import State Machine
The following State machine import into the table “persons” from the schema “stg” located in the environment “testenv” of the project “default” a CSV file named “persons.csv” from the S3 file store “minIO”.
{
"StartAt": "import",
"TimeoutSeconds": 3600,
"States": {
"import": {
"TimeoutSeconds": 3600,
"Type": "Task",
"Resource": "BulkImportExport",
"Parameters": {
"DatabaseSchema": "stg",
"DatabaseTable": "persons",
"StoreUrl": "s3://minio/persons.csv",
"Action": "Import",
"EnvironmentName": "testenv",
"ProjectName": "default"
},
"End": true
}
}
}