Ask AI
Skip to main content

Delete from ext. database

Function: Delete from external database

This action allows you to remove one or more records from a table in an external database that is connected to your platform. You can specify exactly which records to delete by setting up filters, or you can choose to delete all records from a table.

Input

  • Database connection: The connection details to your external database. This tells the platform which database to interact with.
  • Table: The name of the specific table within your connected database from which you want to delete records.
  • Data format: The structure or schema of the data in the selected table. This helps the platform understand the columns available for filtering.
  • Filters: (Optional) A set of conditions that determine which specific records should be deleted. If you don't provide any filters, all records in the specified table will be deleted.
    • Add filter: Click this to add a new filtering condition.
      • Attribute: Select a specific column (field) from your table's data structure that you want to check.
      • Operator: Choose how the attribute's value should be compared (e.g., "Equal to", "Greater than", "Contains").
      • Value: Enter the specific data you want to compare against the selected attribute.

Output

This action does not produce a direct output value. Its primary outcome is the deletion of records from your external database. If the action completes successfully, the specified records will be removed.

Execution Flow

Real-Life Examples

Here are some practical examples of how you can use the "Delete from external database" action:

Example 1: Deleting a specific customer record

Imagine you have a Customers table in your external database, and you want to remove a customer with a specific ID.

  • Inputs:
    • Database connection: My CRM Database
    • Table: Customers
    • Data format: Customer_Schema (representing the structure of your Customers table)
    • Filters:
      • Add filter:
        • Attribute: CustomerID
        • Operator: Equal
        • Value: 12345
  • Result: The customer record with CustomerID 12345 will be permanently removed from the Customers table in your external database.

Example 2: Removing old, inactive product listings

Suppose you have a Products table and want to clean up by deleting all products that have been marked as "Inactive" for more than a year.

  • Inputs:
    • Database connection: Product Catalog DB
    • Table: Products
    • Data format: Product_Schema
    • Filters:
      • Add filter:
        • Attribute: Status
        • Operator: Equal
        • Value: Inactive
      • Add filter:
        • Attribute: LastUpdatedDate
        • Operator: Less than
        • Value: [Current Date - 365 days] (You would typically use a dynamic date variable here)
  • Result: All product records in the Products table that have a Status of "Inactive" AND were LastUpdatedDate more than one year ago will be deleted.

Example 3: Clearing all temporary log entries

You might have a SystemLogs table that stores temporary log entries, and you need to periodically clear all of them to free up space.

  • Inputs:
    • Database connection: Application Logs DB
    • Table: SystemLogs
    • Data format: LogEntry_Schema
    • Filters: (No filters are provided)
  • Result: All records in the SystemLogs table will be permanently deleted from your external database.