Input Database - Synthreo Builder
Input Database node for Builder - retrieve structured data from connected databases into your workflow, with support for table and column selection, SQL-style filters, and row limits.
Purpose
Section titled “Purpose”The Input Database node connects workflows to your organization’s databases. It retrieves data from tables and makes it available for automation, AI processing, and downstream nodes. Use it to pull customer records, transactions, inventory levels, HR data, or any structured business information stored in a connected database system.
Outputs
Section titled “Outputs”- Retrieved database rows as structured data objects.
- Metadata about the selected database, table, and applied filters.
Each row retrieved from the database becomes an item that flows through the rest of the workflow. Downstream nodes can access individual column values from each row using standard variable reference syntax.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| Database | Dropdown | Yes | None | Select the database connection configured in your ThreoAI credentials. Only databases that have been connected to the platform appear in this list. |
| Table | Dropdown (searchable) | Yes | None | Select the target table within the chosen database. The dropdown is searchable to support databases with many tables. |
| Column | Data Grid | No | Empty | Configure the purpose of each column. Set a column to Input to include it in the retrieved data. Set it to Predict to mark it for downstream analysis or machine learning steps. Set it to Ignore to exclude it from the query entirely. Excluding irrelevant columns reduces the data volume passed through the workflow. |
| Filter | String | No | Empty | A SQL-style filter condition applied to the query. Only rows matching the condition are returned. Example: status = 'active' or created_date > '2024-01-01' or amount > 100 AND region = 'West'. Multiple conditions can be combined using AND and OR. |
| Limit | Number | No | 0 | Maximum number of rows to retrieve. A value of 0 means no limit - all matching rows are returned. Set a limit when you only need the most recent or top-ranked records, or when working with large tables during development and testing. |
| Sort | String | No | Empty | Sort order for the retrieved rows. Uses SQL-style syntax: specify the column name followed by ASC or DESC. Example: created_date DESC returns the most recent records first. Multiple sort columns can be specified separated by commas: region ASC, revenue DESC. |
| Disable Cache | Boolean | No | false | By default, query results may be cached to improve performance. Enable Disable Cache when the underlying data changes frequently and the workflow must always work with the latest values. Examples include live inventory levels, real-time transaction monitoring, or appointment scheduling where stale data would cause errors. |
| Manual Order | Number | No | 1 | When a workflow contains multiple Input Database nodes, this setting controls the order in which they execute. Nodes with lower Manual Order values run first. Use this to ensure dependent queries run in the correct sequence. |
Filter Syntax Details
Section titled “Filter Syntax Details”The Filter field accepts SQL WHERE clause conditions. The database connection evaluates these conditions server-side, so only matching rows are transferred to the workflow.
Supported operators and patterns include:
- Equality:
column = 'value'orcolumn = 123 - Inequality:
column != 'value'orcolumn <> 'value' - Comparison:
amount > 100,amount >= 100,amount < 100,amount <= 100 - Range:
amount BETWEEN 100 AND 500 - Pattern matching:
name LIKE 'Acme%'(% is wildcard) - List membership:
status IN ('active', 'pending') - Null checks:
email IS NULLoremail IS NOT NULL - Combining conditions:
status = 'active' AND region = 'West' - Grouping:
(status = 'active' OR status = 'pending') AND amount > 500
String values must be enclosed in single quotes. Numeric values do not use quotes.
How DCS Data Maps to Variables
Section titled “How DCS Data Maps to Variables”Once the Input Database node retrieves rows, the data is available to downstream nodes. Each row becomes a data object and the column values within that row are accessible by their column names.
For example, if the table has columns customer_name, email, and status, a downstream LLM prompt can reference these as:
Customer: {{customer_name}}Email: {{email}}Status: {{status}}When the workflow processes multiple rows (e.g., from a query that returns 50 records), the nodes downstream of the Input Database node typically execute once per row unless a batching or aggregation node is used in between.
If you need the full result set as a single array (for example, to pass all records to a Custom Script node), set the column purpose to Input for all relevant columns and handle the array in the script.
Example Usage
Section titled “Example Usage”- Customer Service: Query the
customer_accountstable with filterstatus = 'active'to preload customer information for support request handling. - Sales Leads: Retrieve new leads using
lead_date > '2024-01-01', markrevenue_potentialas Predict, and sort bycompany_size DESC. - Inventory Management: Pull low-stock items using
current_stock < minimum_thresholdand trigger a reorder workflow. - Healthcare Records: Fetch upcoming appointments by filtering
appointment_date >= TODAY()sorted byappointment_date ASC. - Fraud Detection: Load recent transactions with
transaction_date >= DATEADD(day, -1, GETDATE()), markingamountandtimestampcolumns as Predict for anomaly analysis. - Daily Reporting: Retrieve all records from the previous day using a date filter and sort by department, then pass the result set to a summarization LLM node.
Best Practices
Section titled “Best Practices”- Use filters and limits to reduce query size and improve performance, especially in production workflows running on a schedule.
- Only configure columns as Input or Predict that are actually needed downstream. Excluding unnecessary columns reduces memory usage and processing time.
- Enable Disable Cache for any data that changes between workflow runs - such as inventory levels, account balances, or appointment slots.
- Use Manual Order to sequence multiple Input Database nodes when later queries depend on values from earlier ones.
- Test filter conditions directly against the database before deploying the workflow to confirm they return the expected rows.
- Document filter and sort logic in an Annotation node nearby in the canvas so future maintainers understand the query intent.
Test Cases
Section titled “Test Cases”- Given: Filter =
created_date > '2024-01-01'- Expected: Only records created after January 1, 2024 are retrieved. - Given: Limit =
50- Expected: The first 50 rows are returned in the specified sort order. - Given: Column
amountset to Predict - Expected: Theamountvalue is available for downstream forecasting or analysis nodes. - Given: Disable Cache =
truewith a live inventory table - Expected: Each workflow run fetches the current stock levels rather than cached values. - Given: Sort =
created_date DESC, Limit =1- Expected: The single most recently created record is returned.