Skip to main content
Skip table of contents

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 export the table “persons” from the schema “stg” located in the environement “testenv” of the project “default” into a file named “persons.csv” of a S3 file store “minio”.

JSON
{
  "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 environement “testenv” of the project “default” a CSV file named “persons.csv” from the S3 file store “minio”.

JSON
{
  "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
    }
  }
}

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.