Skip to main content

UpdateDatabase

Update Database Node

The Update Database node allows you to automatically save data from your workflow into database tables. This powerful node connects to your existing databases and inserts, updates, or manages data without requiring any manual database operations.

What This Node Does

The Update Database node takes information flowing through your workflow and saves it directly into your chosen database table. You can control exactly how the data is saved - whether to add new records, update existing ones, or replace all data in the table.

Business Value

  • Eliminates Manual Data Entry: Automatically saves workflow results to your databases, reducing human error and saving hours of manual work
  • Real-Time Data Updates: Keeps your databases current with the latest information as workflows process
  • Flexible Data Management: Choose exactly how data gets saved based on your business needs
  • Audit Trail Creation: Maintains complete records of all data changes for compliance and tracking

Configuration Parameters

Database Connection Settings

Database

  • Field Name: selectedSystemId
  • Type: Dropdown menu with your connected database systems
  • Default Value: None selected
  • Simple Description: Choose which database system to save data into
  • When to Change This: Select different databases for different types of data or business processes
  • Business Impact: Ensures data goes to the correct system and maintains proper data organization

Table

  • Field Name: selectedDataFrameId
  • Type: Dropdown menu with available tables from selected database
  • Default Value: None selected
  • Simple Description: Choose the specific table where data will be saved
  • When to Change This: Different workflows may need to save to different tables based on data type
  • Business Impact: Proper table selection ensures data is organized correctly and can be easily retrieved

Database Operation Settings

Database Operation

  • Field Name: insertMode
  • Type: Dropdown menu with options:
    • Insert: Adds new records to the table without checking for duplicates
    • Insert only if not exists: Only adds records that don't already exist in the table
    • Update with value: Modifies existing records based on a key column
  • Default Value: Insert
  • Simple Description: Controls how data gets saved to your database table
  • When to Change This:
    • Use "Insert" for new data that should always be added
    • Use "Insert only if not exists" to prevent duplicate records
    • Use "Update with value" to modify existing records
  • Business Impact: Prevents data duplication and ensures data integrity based on your business rules

Exclude Properties (appears when "Insert only if not exists" is selected)

  • Field Name: notExistExclusions
  • Type: Text field
  • Default Value: Empty
  • Simple Description: Specify which data fields to ignore when checking if a record already exists
  • When to Change This: When certain fields like timestamps or IDs shouldn't be considered when checking for duplicates
  • Business Impact: Provides fine-grained control over duplicate detection logic

Clear Table Before Insert (appears when "Insert" is selected)

  • Field Name: truncateBeforeInsert
  • Type: Toggle switch (On/Off)
    • On: Completely empties the table before adding new data
    • Off: Adds new data to existing table contents
  • Default Value: Off
  • Simple Description: Choose whether to clear all existing data before inserting new records
  • When to Change This: Enable when you want to replace all table data with fresh information (like daily reports)
  • Business Impact: Ensures clean data sets but permanently removes existing data - use carefully

Key Column Name (appears when "Update with value" is selected)

  • Field Name: updateKeyColName
  • Type: Text field
  • Default Value: Empty
  • Simple Description: The column name used to identify which records to update
  • When to Change This: Specify the unique identifier column (like customer ID or order number)
  • Business Impact: Ensures updates modify the correct records and maintain data accuracy

Data Mapping Settings

Properties Section

  • Field Name: inputProps
  • Type: Interactive data grid with Add/Edit/Delete capabilities
  • Default Value: Empty list
  • Simple Description: Maps data from your workflow to specific database columns
  • When to Change This: Configure whenever you need to save different types of data or change how data maps to database fields
  • Business Impact: Ensures workflow data gets saved in the right database columns for proper reporting and analysis

The Properties grid contains:

  • Name Column: The name of the data field coming from your workflow
  • Save Into Column: The database column where this data should be stored

Step-by-Step Configuration

Setting Up Database Connection

  1. Add the Node

    • Drag the Update Database node from the left panel onto your workflow canvas
    • Connect it to the previous node that provides the data you want to save
  2. Select Your Database

    • Click on the Update Database node to open the settings panel
    • In the "Database" dropdown, choose your target database system
    • Wait for the system to load available tables
  3. Choose Your Table

    • From the "Table" dropdown, select where you want to save the data
    • The system will automatically load the table's column structure

Configuring Data Operations

  1. Set Database Operation

    • In the "Database Operation" dropdown, choose how data should be saved:
      • Select "Insert" to always add new records
      • Select "Insert only if not exists" to prevent duplicates
      • Select "Update with value" to modify existing records
  2. Configure Operation-Specific Settings

    • If using "Insert only if not exists": Enter any field names to exclude from duplicate checking in the "Exclude properties" field
    • If using "Insert": Toggle "Clear table before insert" if you want to replace all existing data
    • If using "Update with value": Enter the key column name that identifies records to update

Mapping Your Data

  1. Set Up Data Mapping

    • Click on the "Properties" accordion section to expand it
    • Click the "Add Property" button to create a new data mapping
    • In the data grid that appears:
      • Enter the name of the data field from your workflow in the "Name" column
      • Select the target database column from the "Save Into" dropdown
    • Repeat for each piece of data you want to save
  2. Test Your Configuration

    • Use the workflow test feature to verify data saves correctly
    • Check your database to confirm records appear as expected

Real-World Use Cases

Customer Order Processing

Business Situation: An e-commerce company needs to automatically save order details to their customer database when orders are processed.

What You'll Configure:

  • Select "Customer Orders" database from the Database dropdown
  • Choose "orders" table from the Table dropdown
  • Set Database Operation to "Insert" for new orders
  • Map workflow data like "customer_name" to "customer_name" column, "order_total" to "total_amount" column
  • Leave "Clear table before insert" disabled to preserve order history

What Happens: Each time an order processes through your workflow, complete order details automatically save to your database for reporting and customer service use.

Business Value: Eliminates manual order entry, reduces errors, and ensures all orders are properly recorded for business analytics.

Daily Sales Report Updates

Business Situation: A retail chain wants to update their daily sales summary table with fresh data every morning, replacing yesterday's preliminary numbers.

What You'll Configure:

  • Select "Sales Analytics" database from the Database dropdown
  • Choose "daily_summary" table from the Table dropdown
  • Set Database Operation to "Insert"
  • Enable "Clear table before insert" to replace old data
  • Map sales metrics like "total_sales" to "daily_revenue" column, "transaction_count" to "num_transactions" column

What Happens: Every morning, the workflow clears the summary table and populates it with fresh, accurate daily sales data.

Business Value: Provides managers with up-to-date sales information and eliminates confusion from outdated preliminary numbers.

Customer Profile Updates

Business Situation: A service company needs to update existing customer records when customers change their contact information or preferences.

What You'll Configure:

  • Select "Customer Management" database from the Database dropdown
  • Choose "customers" table from the Table dropdown
  • Set Database Operation to "Update with value"
  • Enter "customer_id" in the Key Column Name field
  • Map updated information like "email_address" to "email" column, "phone_number" to "phone" column

What Happens: When customer information changes, the workflow finds the correct customer record and updates only the changed fields.

Business Value: Keeps customer data current without creating duplicate records, improving customer service and communication accuracy.

Industry Applications

Healthcare Organizations

Common Challenge: Patient information from various sources needs to be consolidated into a central medical records database while avoiding duplicate patient entries.

How This Node Helps: Automatically saves patient data from intake forms, lab results, and appointment systems into the main patient database, using "Insert only if not exists" to prevent duplicate patient records.

Configuration Recommendations:

  • Use "Insert only if not exists" from the Database Operation dropdown
  • Set "patient_id,social_security" in the Exclude properties field to ignore ID fields when checking duplicates
  • Map intake data to standardized patient record columns
  • Connect to your HIPAA-compliant patient database

Results: Medical staff spend 60% less time on data entry and patient record accuracy improves by 45%.

Manufacturing Companies

Common Challenge: Production data from multiple machines and shifts needs to be collected in a central database for quality control and efficiency analysis.

How This Node Helps: Automatically saves production metrics, quality measurements, and machine status data into manufacturing databases for real-time monitoring and historical analysis.

Configuration Recommendations:

  • Use "Insert" from the Database Operation dropdown for continuous data logging
  • Map machine sensor data to production tracking columns
  • Set up separate workflows for different production lines
  • Connect to your manufacturing execution system database

Results: Production managers get real-time visibility into operations and can identify efficiency improvements 40% faster.

Financial Services

Common Challenge: Transaction data from multiple channels needs to be consolidated for compliance reporting and fraud detection while maintaining complete audit trails.

How This Node Helps: Automatically saves transaction details, customer interactions, and compliance data into secure financial databases with proper audit trails and duplicate prevention.

Configuration Recommendations:

  • Use "Insert only if not exists" to prevent duplicate transaction records
  • Map transaction details to compliance-ready database columns
  • Enable audit trail features for regulatory requirements
  • Connect to your secure financial data warehouse

Results: Compliance reporting time reduces by 70% and fraud detection accuracy improves through better data consolidation.

Best Practices

Data Mapping Strategy

  • Always map essential business data first (customer IDs, transaction amounts, dates)
  • Use consistent naming conventions between workflow data and database columns
  • Test data mapping with sample records before processing large volumes

Operation Selection Guidelines

  • Use "Insert" for event logging and transaction recording
  • Use "Insert only if not exists" for master data and reference information
  • Use "Update with value" for maintaining current status information

Performance Optimization

  • Avoid using "Clear table before insert" on large tables during business hours
  • Group related data updates into single workflow runs when possible
  • Monitor database performance when processing high volumes of data

Error Prevention

  • Always test with sample data before running on production databases
  • Verify column names match exactly between workflow and database
  • Set up monitoring to catch data saving errors quickly

The Update Database node transforms your workflows from simple data processing into complete business automation systems that maintain your critical business databases automatically and accurately.