Skip to content

Execute Sql

rdsdataservice_execute_sql R Documentation

Runs one or more SQL statements

Description

Runs one or more SQL statements.

This operation isn't supported for Aurora PostgreSQL Serverless v2 and provisioned DB clusters, and for Aurora Serverless v1 DB clusters, the operation is deprecated. Use the batch_execute_statement or execute_statement operation.

Usage

rdsdataservice_execute_sql(dbClusterOrInstanceArn, awsSecretStoreArn,
  sqlStatements, database, schema)

Arguments

dbClusterOrInstanceArn

[required] The ARN of the Aurora Serverless DB cluster.

awsSecretStoreArn

[required] The Amazon Resource Name (ARN) of the secret that enables access to the DB cluster. Enter the database user name and password for the credentials in the secret.

For information about creating the secret, see Create a database secret.

sqlStatements

[required] One or more SQL statements to run on the DB cluster.

You can separate SQL statements from each other with a semicolon (;). Any valid SQL statement is permitted, including data definition, data manipulation, and commit statements.

database

The name of the database.

schema

The name of the database schema.

Value

A list with the following syntax:

list(
  sqlStatementResults = list(
    list(
      resultFrame = list(
        resultSetMetadata = list(
          columnCount = 123,
          columnMetadata = list(
            list(
              name = "string",
              type = 123,
              typeName = "string",
              label = "string",
              schemaName = "string",
              tableName = "string",
              isAutoIncrement = TRUE|FALSE,
              isSigned = TRUE|FALSE,
              isCurrency = TRUE|FALSE,
              isCaseSensitive = TRUE|FALSE,
              nullable = 123,
              precision = 123,
              scale = 123,
              arrayBaseColumnType = 123
            )
          )
        ),
        records = list(
          list(
            values = list(
              list(
                isNull = TRUE|FALSE,
                bitValue = TRUE|FALSE,
                bigIntValue = 123,
                intValue = 123,
                doubleValue = 123.0,
                realValue = 123.0,
                stringValue = "string",
                blobValue = raw,
                arrayValues = list(
                  list()
                ),
                structValue = list(
                  attributes = list(
                    list()
                  )
                )
              )
            )
          )
        )
      ),
      numberOfRecordsUpdated = 123
    )
  )
)

Request syntax

svc$execute_sql(
  dbClusterOrInstanceArn = "string",
  awsSecretStoreArn = "string",
  sqlStatements = "string",
  database = "string",
  schema = "string"
)