AWS QLDB icon

AWS QLDB

Sends commands to an Amazon QLDB

Overview

This node integrates with Amazon QLDB (Quantum Ledger Database) to perform various database operations on a specified ledger and table. It allows users to create, update, upsert, select, or run direct queries against the ledger's tables. This is useful for scenarios where an immutable, cryptographically verifiable ledger is required, such as financial transaction records, supply chain tracking, or audit logs.

Practical examples:

  • Inserting new transaction records into a financial ledger.
  • Updating existing entries based on certain conditions.
  • Running custom queries to retrieve specific data from the ledger.
  • Upserting documents to either create or update records atomically.

Properties

Name Meaning
Ledger Name of the ledger in Amazon QLDB to operate on.
Table Name of the table (also called a database) within the ledger where operations are performed.
Operation The action to perform; options include: All (select all), Create (insert), Create or Update (upsert), Direct Query, Select, Update.
Document JSON content of the document to insert, update, or upsert. Required for insert, update, and upsert operations.
Where JSON object representing the filter criteria for select, update, and upsert operations.
Direct Query A raw QLDB SQL query string to execute when using the Direct Query operation.
Flatten Results Boolean flag indicating whether to unpack document updates into individual outputs. May result in more or fewer outputs than inputs.

Output

The node outputs an array of JSON objects representing the results of the executed operation. Each output item corresponds to a document retrieved or affected by the operation. When "Flatten Results" is enabled, the output array is flattened so that each document update is returned as a separate item.

If the operation involves document modifications (insert, update, upsert), the output contains the resulting documents after the operation. For select and direct query operations, it returns the matching documents.

No binary data output is produced by this node.

Dependencies

  • Requires valid AWS credentials with permissions to access Amazon QLDB ledgers.
  • The node uses AWS SDK internally to connect to QLDB, so proper configuration of AWS region and credentials is necessary.
  • The user must provide the ledger name and table name to target the correct QLDB resources.

Troubleshooting

  • Common issues:

    • Invalid or missing AWS credentials will cause authentication failures.
    • Incorrect ledger or table names will result in errors or empty results.
    • Malformed JSON in the "Document" or "Where" fields can cause parsing errors.
    • Using unsupported operations or invalid query syntax in the Direct Query may lead to execution errors.
  • Error messages:

    • Authentication errors typically indicate missing or incorrect API keys.
    • JSON parse errors suggest invalid JSON input in document or filter properties.
    • Query syntax errors come from malformed QLDB SQL statements.
  • Resolutions:

    • Verify AWS credentials and permissions.
    • Double-check ledger and table names for typos.
    • Validate JSON inputs before running the node.
    • Test queries independently in the QLDB console to ensure correctness.

Links and References

Discussion