Overview
This node performs an upsert operation on records in Larkbase, a database platform. It allows users to update existing records or insert new ones based on matching key columns. The node supports automatic or manual mapping of input data to Larkbase columns, filtering records by time, and chunked API calls for efficiency. It is useful for synchronizing data from other sources into Larkbase, ensuring data consistency and avoiding duplicates.
Use Case Examples
- Automatically map input JSON data fields to corresponding Larkbase columns and upsert records.
- Manually define mappings for each Larkbase column with specific values or expressions from input data.
- Filter records to upsert based on a time range to limit the data processed.
- Use key columns to match existing records for update, otherwise insert new records.
Properties
| Name | Meaning |
|---|---|
| Base ID / App Token | Identifier or token for the Larkbase base or app to connect to. |
| Table ID | Identifier of the target table in Larkbase where records will be upserted. |
| Access Token | Access token for authenticating API requests to Larkbase. |
| Get Fields và Tạo Mapping | Boolean flag to fetch the list of fields from Larkbase and automatically create mapping suggestions for input data. |
| Cột Khóa (Key Columns) | One or more columns selected as keys to match records for upsert operations. |
| Chế độ dữ liệu | Mode of mapping input data to Larkbase columns: automatic mapping by matching names or manual definition of each column's value. |
| Giá trị cần gửi | Collection of fields and their values to send to Larkbase when manual mapping mode is selected. |
| Lọc theo thời gian | Boolean flag to filter existing data by a time range to reduce the number of records compared. |
| Field Thời gian | The time field used for filtering records, typically created_at or updated_at. |
| Thời gian bắt đầu | Start time for filtering records, in ISO datetime format. |
| Thời gian kết thúc | End time for filtering records, in ISO datetime format. |
| Chế độ Debug và Hiển thị Log | Level of detail for debug and log information shown in the UI during execution. |
| Hiển thị chi tiết API Requests | Show detailed API requests sent, with emoji and readable formatting, only when full debug mode is enabled. |
| Hiển thị chi tiết API Responses | Show detailed API responses received, with visual icons and readable formatting, only when full debug mode is enabled. |
| Kích thước Chunk | Maximum number of records to send in one API call, up to 500. |
| Bỏ qua records không hợp lệ | Skip invalid records instead of stopping execution with an error. |
Output
JSON
success- Indicates whether the upsert operation was successful.insertedRecords- List of records that were inserted as new entries.updatedRecords- List of records that were updated based on matching keys.skippedRecords- List of records skipped due to invalid data or filters.debugInfo- Debug and log information depending on the selected debug mode.
Dependencies
- Requires access to Larkbase API with valid App Token, Table ID, and Access Token credentials.
Troubleshooting
- If 'Get Fields và Tạo Mapping' is enabled but no fields load, check that App Token, Table ID, and Access Token are correctly provided and valid.
- If upsert fails, verify that key columns are correctly selected and exist in both input data and Larkbase table.
- Ensure chunk size does not exceed 500 records per API call to avoid request errors.
- If records are skipped, check the 'Bỏ qua records không hợp lệ' setting and validate input data format.
- Enable debug modes for detailed logs to diagnose API request/response issues.