Table Of Contents

Feedback

User Guide

First time using the AWS CLI? See the User Guide for help getting started.

[ aws . rds-data ]

batch-execute-statement

Description

Runs a batch SQL statement over an array of data.

You can run bulk update and insert operations for multiple records using a DML statement with different parameter sets. Bulk operations can provide a significant performance improvement over individual insert and update operations.

Warning

If a call isn't part of a transaction because it doesn't include the transactionID parameter, changes that result from the call are committed automatically.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

Synopsis

  batch-execute-statement
[--database <value>]
[--parameter-sets <value>]
--resource-arn <value>
[--schema <value>]
--secret-arn <value>
--sql <value>
[--transaction-id <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Options

--database (string)

The name of the database.

--parameter-sets (list)

The parameter set for the batch operation.

Shorthand Syntax:

[{name=string,value={blobValue=blob,booleanValue=boolean,doubleValue=double,isNull=boolean,longValue=long,stringValue=string}},{name=string,value={blobValue=blob,booleanValue=boolean,doubleValue=double,isNull=boolean,longValue=long,stringValue=string}}] ...

JSON Syntax:

[
  [
    {
      "name": "string",
      "value": {
        "blobValue": blob,
        "booleanValue": true|false,
        "doubleValue": double,
        "isNull": true|false,
        "longValue": long,
        "stringValue": "string"
      }
    }
    ...
  ]
  ...
]

--resource-arn (string)

The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.

--schema (string)

The name of the database schema.

--secret-arn (string)

The name or ARN of the secret that enables access to the DB cluster.

--sql (string)

The SQL statement to run.

--transaction-id (string)

The identifier of a transaction that was started by using the BeginTransaction operation. Specify the transaction ID of the transaction that you want to include the SQL statement in.

If the SQL statement is not part of a transaction, don't set this parameter.

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.

Output

updateResults -> (list)

The execution results of each batch entry.

(structure)

The response elements represent the results of an update.

generatedFields -> (list)

Values for fields generated during the request.

(structure)

Contains a value.

blobValue -> (blob)

A value of BLOB data type.

booleanValue -> (boolean)

A value of Boolean data type.

doubleValue -> (double)

A value of double data type.

isNull -> (boolean)

A NULL value.

longValue -> (long)

A value of long data type.

stringValue -> (string)

A value of string data type.