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 supports creating, updating, upserting (create or update), selecting, and running direct queries on the ledger's tables.

Common scenarios where this node is beneficial include:

  • Maintaining an immutable ledger of transactions or records with cryptographic verification.
  • Performing CRUD operations on ledger data within automated workflows.
  • Querying ledger data using custom QLDB SQL statements.
  • Synchronizing application data with a QLDB ledger for auditability.

Practical examples:

  • Insert a new financial transaction record into a ledger table.
  • Update existing user profile information based on a filter condition.
  • Upsert inventory items to ensure they exist or are updated accordingly.
  • Run a direct query to fetch all records matching complex criteria.

Properties

Name Meaning
Ledger Name of the ledger to connect to in Amazon QLDB.
Table Name of the table (also called a database) within the ledger to operate on.
Where JSON object representing the filter clause used for selecting or updating records.
Document JSON object containing the document contents to insert, update, or upsert into the table.
Flatten Results Boolean flag indicating whether to unpack document updates; may change the number of outputs.

Output

The node outputs an array of JSON objects representing the results of the executed operation. Each output item corresponds to one input item processed.

  • For select and query operations, the output contains the matched documents from the ledger table.
  • For insert, update, and upsert operations, the output includes the resulting documents after the operation.
  • If "Flatten Results" is enabled, the output array is flattened so that each document update is a separate output item, which can result in more or fewer outputs than inputs.

The output JSON structure typically contains the full document fields as stored in QLDB.

No binary data output is produced by this node.

Dependencies

  • Requires valid AWS credentials with permissions to access Amazon QLDB.
  • The node expects AWS credentials to be configured in n8n (e.g., via an API key credential).
  • Uses the AWS region and access keys from the provided credentials to connect to QLDB.
  • No additional external dependencies beyond AWS SDK and QLDB service client.

Troubleshooting

  • Invalid Credentials: Errors related to authentication usually indicate missing or incorrect AWS credentials. Ensure the API key credential is properly set up with correct access keys and region.
  • Malformed JSON in 'Where' or 'Document': Since these properties expect JSON strings, invalid JSON will cause parsing errors. Validate JSON syntax before use.
  • Operation Not Supported: Selecting an unsupported operation value or missing required parameters for an operation will cause errors.
  • Empty or Incorrect Ledger/Table Names: Providing empty or wrong ledger or table names will lead to connection or query failures.
  • Flatten Results Side Effects: Enabling flattening may produce unexpected numbers of output items; use carefully depending on downstream workflow expectations.

Links and References

Discussion