Building PartiQL Statements - Amazon DynamoDB

Building PartiQL Statements

To use the NoSQL Workbench to build PartiQL for DynamoDB statements choose PartiQL operations at the top right corner of the NoSQL Workbench.

You can build the following PartiQL statement types in the operation builder.

Singleton Statements

To run or generate code for a PartiQL statement, do the following.

  1. Choose PartiQL statement.

  2. Enter a valid PartiQL statement.

  3. If your statement uses parameters

    1. Choose Optional request parameters.

    2. Choose Add new parameters.

    3. Enter the attribute type and value

    4. If you want to add additional parameters, repeat steps b and c.

  4. If you want to generate code, choose Generate code.

    Select your desired language from the displayed tabs. You can now copy this code and use it in your application.

  5. If you want the operation to be run immediately, choose Run.

Transactions

To run or generate code for a PartiQL transaction, do the following.

  1. Choose PartiQL transaction.

  2. Choose Add a new statement.

  3. Enter a valid PartiQL statement.

    Note

    Read and write operations are not supported in the same PartiQL transaction request. A SELECT statement cannot be in the same request with INSERT, UPDATE, and DELETE statements. See Performing Transactions with PartiQL for DynamoDB for more details.

  4. If your statement uses parameters

    1. Choose Optional request parameters.

    2. Choose Add new parameters.

    3. Enter the attribute type and value

    4. If you want to add additional parameters, repeat steps b and c.

  5. If you want to add more statements repeat steps 2 to 4.

  6. If you want to generate code, choose Generate code.

    Select your desired language from the displayed tabs. You can now copy this code and use it in your application.

  7. If you want the operation to be run immediately, choose Run.

Batch

To run or generate code for a PartiQL batch, do the following.

  1. Choose PartiQL batch.

  2. Choose Add a new statement.

  3. Enter a valid PartiQL statement.

    Note

    Read and write operations are not supported in the same PartiQL batch request, which means a SELECT statement cannot be in the same request with INSERT, UPDATE, and DELETE statements. Write operations to the same item are not allowed. As with the BatchGetItem operation, only singleton read operations are supported. Scan and query operations are not supported. See Running Batch Operations with PartiQL for DynamoDB for more details.

  4. If your statement uses parameters

    1. Choose Optional request parameters.

    2. Choose Add new parameters.

    3. Enter the attribute type and value

    4. If you want to add additional parameters, repeat steps b and c.

  5. If you want to add more statements repeat steps 2 to 4.

  6. If you want to generate code, choose Generate code.

    Select your desired language from the displayed tabs. You can now copy this code and use it in your application.

  7. If you want the operation to be run immediately, choose Run.