Query Data Node
Search a data source and retrieve matching results.
Overview
The Query Data node searches a data source and returns matching results. It supports two search modes — Semantic and Structured — giving you flexibility between natural language queries and precise column-level filtering. Results can be returned in multiple output formats for easy integration with downstream nodes.
Data sources include Ubex Tables. Any table you create in My Data is available as a data source here. You can query built-in Ubex tables without needing an external database. See the My Data documentation for how to create tables.
Configuration
| Field | Description | Required |
|---|---|---|
Select Source |
The data source to query against | Yes |
Search Mode |
Toggle between Semantic or Structured search | Yes |
Select output format |
How results are returned (List of Rows, Single Row, Key-Value Dictionary) | Yes |
Output Variable |
Variable name to store results | Yes |
Search Modes
Semantic
Searches across all searchable columns using AI-powered semantic matching. Ideal for natural language queries where you want to find results by meaning rather than exact values.
| Field | Description | Required |
|---|---|---|
Search Query |
Free-text query input. Supports variables via the Insert Variable button. | Yes |
Advanced Options (Semantic only)
| Setting | Type | Range | Default | Description |
|---|---|---|---|---|
Number of Results |
Slider | 1–20 | 5 | Maximum number of matching results to return |
Relevance Threshold |
Slider | 0–1 | 0.7 | Minimum similarity score for inclusion (0 = any match, 1 = exact match) |
Structured
Query your data source with precise control over columns, filters, sorting, and pagination. Best for when you know the exact shape of the data you need.
| Field | Description | Required |
|---|---|---|
Columns to Return |
Select which columns to include in results. Use All or None shortcuts. | Yes |
Filters |
Add conditions to narrow down results | No |
Sort By |
Order results by one or more columns | No |
Limit |
Maximum number of rows to return (default: 100) |
No |
Offset |
Number of rows to skip from the start (default: 0) |
No |
Select Output Format
Control how results are shaped before passing them to the next node.
| Format | Description |
|---|---|
List of Rows |
Returns all matching results as an array of objects (default) |
Single Row (First) |
Returns only the first matching result as a single object |
Key-Value Dictionary |
Returns results as a key-value map for direct property access |
Example: Semantic Knowledge Base Search
Query a knowledge base with a user's question:
Select Source: product-docs
Mode: Semantic
Search Query: {{user_question}}
Number of Results: 5
Relevance Threshold: 0.7
Output Format: List of Rows
Output Variable: searchResults
Then pass {{searchResults}} to a Model node for answer generation.
Example: Structured Data Lookup
Retrieve specific columns with filtering and pagination:
Select Source: contact_rate_limits
Mode: Structured
Columns to Return: email, attempt_count, window_start
Filters: attempt_count > 5
Sort By: window_start DESC
Limit: 100
Offset: 0
Output Format: List of Rows
Output Variable: rateLimitData
Example: Single Record Fetch
Get just the first matching row for a quick lookup:
Select Source: users
Mode: Structured
Columns to Return: email, name, role
Filters: email == {{input_email}}
Output Format: Single Row (First)
Output Variable: currentUser
Access fields directly: {{currentUser.name}}, {{currentUser.role}}.
Example: Key-Value Dictionary
Return results as a dictionary for direct property access:
Select Source: app_settings
Mode: Structured
Columns to Return: All
Output Format: Key-Value Dictionary
Output Variable: settings
Using Variables
Pass dynamic queries from previous nodes:
{{user_input}}
{{extracted_keywords}}
{{model_generated_query}}
Use the Insert Variable button in Semantic mode to browse and insert available variables.
Best Practices
- Use Semantic mode for natural language queries and RAG workflows
- Use Structured mode when you need precise control over columns, filters, and sorting
- Choose Single Row (First) when you only need one result to avoid unnecessary data
- Use Key-Value Dictionary when downstream nodes need direct property access
- Set appropriate Limit and Offset values in Structured mode for pagination
- Lower the relevance threshold in Semantic mode if you're getting too few results