Import from S3

POST {{HDB_ENDPOINT}}

This operation allows users to import CSV or JSON files from an AWS S3 bucket as an insert, update, or upsert.

  • operation (required) - must always be importfroms3
  • action (optional) - type of action you want to perform - 'insert', 'update', or 'upsert'. The default is 'insert'.
  • schema (required) - name of the schema where you are loading your data
  • table (required) - name of the table where you are loading your data
  • s3 (required) - object containing required AWS S3 bucket infor for operation
    • awsaccesskeyid - AWS access key for authenticating into your S3 bucket
    • awssecretaccesskey - AWS secret for authenticating into your S3 bucket
    • bucket - AWS S3 bucket to import from
    • key - the name of the file to import - the file must include a valid file extension ('.csv' or '.json')
  • Request Body

    {"operation"=>"import_from_s3", "action"=>"insert", "schema"=>"dev", "table"=>"dog", "s3"=>{"aws_access_key_id"=>"YOUR_KEY", "aws_secret_access_key"=>"YOUR_SECRET_KEY", "bucket"=>"BUCKET", "key"=>"FILENAME"}}
    

    HEADERS

    KeyDatatypeRequiredDescription
    Content-Typestring

    RESPONSES

    status: OK

    {"message":"Starting job with id 062a1892-6a0a-4282-9791-0f4c93b12e16"}