Larkbase Upsert icon

Larkbase Upsert

Tạo mới hoặc cập nhật dữ liệu trong Larkbase dựa trên khóa so sánh

Overview

This node, named 'Larkbase Upsert', is designed to upsert (create or update) records in a Larkbase database based on input data. It supports mapping input data to Larkbase table columns either automatically or manually, filtering records by time, and handling key columns for matching records. It is useful for synchronizing or updating data in Larkbase from other sources, such as integrating with other systems or automating data workflows.

Use Case Examples

  1. Automatically map input JSON data fields to corresponding Larkbase table columns to update records.
  2. Manually define specific column-value mappings for precise control over data sent to Larkbase.
  3. Filter records by a time range to limit the scope of data being upserted, improving performance and relevance.

Properties

Name Meaning
Base ID / App Token Identifier for the Larkbase base or application token used for authentication.
Table ID Identifier of the Larkbase table where records will be upserted.
Access Token Access token for authenticating API requests to Larkbase.
Get Fields và Tạo Mapping Boolean flag to refresh and load the list of fields from Larkbase and automatically create suggested mapping fields for input data.
Cột Khóa (Key Columns) One or more columns selected as key columns for matching records during upsert operations.
Chế độ dữ liệu (Data Mode) Mode to map input data to Larkbase columns: either automatically map input data fields to columns or manually define each column's value.
Giá trị cần gửi (Fields to Send) Collection of fields and their values to send to Larkbase when manual mapping mode is selected.
Lọc theo thời gian (Use Time Filter) Boolean flag to filter existing data by a time range to reduce the number of records to compare.
Field Thời gian (Time Filter Field) The time field (e.g., created_at or updated_at) used for filtering records by time.
Thời gian bắt đầu (Start Time) Start time in ISO format for filtering records.
Thời gian kết thúc (End Time) End time in ISO format for filtering records.
Chế độ Debug và Hiển thị Log (Debug and Output Mode) Level of detail for debug and log information displayed on the UI during processing.
Hiển thị chi tiết API Requests Show detailed API requests on UI with emoji and readable formatting (only when debug mode is Full).
Hiển thị chi tiết API Responses Show detailed API responses on UI with visual icons and readable formatting (only when debug mode is Full).
Kích thước Chunk (Chunk Size) Maximum number of records per API call (up to 500).
Bỏ qua records không hợp lệ (Skip Invalid Records) Skip invalid records instead of stopping with an error.

Output

JSON

  • successCount - Number of records successfully upserted.
  • failureCount - Number of records that failed to upsert.
  • details - Detailed information about each record processed, including errors if any.

Dependencies

  • Requires access to Larkbase API using provided App Token and Access Token credentials.

Troubleshooting

  • If 'Get Fields và Tạo Mapping' is enabled but fields do not load, check that App Token, Table ID, and Access Token are correctly provided and valid.
  • If the node fails with authentication errors, verify that the Access Token and App Token are correct and have necessary permissions.
  • When using manual mapping, ensure column names exactly match those in Larkbase to avoid errors.
  • If the node stops due to invalid records, consider enabling 'Skip Invalid Records' to continue processing valid data.
  • Time filter requires valid ISO date strings for start and end times; invalid formats will cause errors.

Links

  • Larkbase API Documentation - Official API documentation for Larkbase, useful for understanding authentication and data operations.

Discussion