Overview
This node integrates with Amazon QLDB (Quantum Ledger Database) to perform various database operations on a specified ledger and table. It supports executing direct custom queries in QLDB SQL, as well as common data manipulation actions like selecting, inserting, updating, and upserting records.
A typical use case is when you want to interact programmatically with an Amazon QLDB ledger to query or modify data without writing separate scripts or using the AWS console. For example, you can run a direct SQL query to fetch specific records or insert new documents into a ledger table.
The "Direct Query" operation allows users to write any valid QLDB SQL statement, providing flexibility for complex queries beyond predefined operations.
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 where operations are done. |
Direct Query | The custom QLDB SQL query string to execute (only shown when Operation is "Direct Query"). |
Flatten Results | Boolean flag indicating whether to unpack document updates; may change output item count. |
Output
The node outputs JSON data representing the results of the executed QLDB operation:
- The
json
output contains an array of objects, each corresponding to a record/document returned or affected by the query. - When "Flatten Results" is enabled, the output array is flattened so that each document update is unpacked into individual items, which may increase or decrease the number of output items compared to input items.
- The output does not include binary data.
Dependencies
- Requires valid AWS credentials with permissions to access Amazon QLDB ledgers.
- The node expects AWS credentials to be configured in n8n (e.g., via an API key credential).
- Uses an internal QLDB service client to communicate with the ledger.
Troubleshooting
- Invalid Credentials: If AWS credentials are missing or incorrect, the node will fail to authenticate. Ensure proper AWS API keys with QLDB access are configured.
- Malformed Query: For the "Direct Query" operation, invalid QLDB SQL syntax will cause errors. Verify the query string carefully.
- Empty or Incorrect Ledger/Table Names: Providing wrong ledger or table names will result in failures connecting or querying. Double-check these inputs.
- JSON Parsing Errors: Some properties expect JSON strings (e.g., filter conditions). Invalid JSON will cause parsing errors.
- Flatten Results Side Effects: Enabling flattening may produce more or fewer output items than expected, which could affect downstream nodes.