The datamart_query_data tool retrieves filtered and sorted row-level data from a single Datamart, up to the specified row limit. The tool does not aggregate data or join multiple Datamarts.
-
Tool Name –
datamart_query_data -
Title – Datamart Query Data
-
Type – Private
Parameters
|
Parameter |
Required |
Description |
|---|---|---|
|
|
Yes |
The technical name of the Datamart to query, for example, |
|
|
Yes |
The exact column names to return. Every column referenced in |
|
|
No |
List of filter conditions, combined with AND. Each entry is an object: |
|
|
- |
Supported operators are:
To specify a range, use two filters on the same column: |
|
|
- |
The comparison value. Use a non-empty list with |
|
|
No |
A single column name to sort by, one of |
|
|
No |
Maximum rows to return, 1 – 500.
|
The tool queries Datamarts only. It does not query Data Sources.
The tool returns row-level data from a single Datamart. It does not support aggregation or joins. Date filters may fail when the filter value type does not match the Datamart column type. When available, use derived date fields such as *Year or *Month for date-based filtering.
Output
Returns an object with the following fields.
|
Field |
Description |
|---|---|
|
|
The Datamart that was queried. |
|
|
Columns present in each row, in order. |
|
|
Matching rows, keyed by column. |
|
|
Number of rows returned. |
|
|
The row limit actually applied after adjustment. |
|
|
The filter conditions actually applied, echoed back. |
|
|
|
Example
Request
datamart="Standard_Sales_Data", columns=["Customer", "Product", "PricingDate", "InvoicePrice", "Quantity"], sort_by="-PricingDate", max_rows=10
Response
Here are the last 10 transactions (most recent by Pricing Date, 2025-12-31) in Standard_Sales_Data:
|
Customer |
Product |
Pricing Date |
Invoice Price |
Quantity |
|---|---|---|---|---|
|
Lakers Industrial Distributor (CID-0098) |
BN1350M2 |
2025-12-31 |
$2,468.81 |
5 |
|
Lakers Industrial Distributor (CID-0098) |
MEG5220-6033 |
2025-12-31 |
$52.98 |
5 |
|
Lakers Industrial Distributor (CID-0098) |
MEG5220-6036 |
2025-12-31 |
$79.04 |
5 |
|
Milo H (CID-0070) |
CN9789 |
2025-12-31 |
$548.60 |
2 |
|
Milo H (CID-0070) |
A9N2103 |
2025-12-31 |
$485.95 |
2 |
|
SO Company Inc UK Global customer Paddington (CID-0031) |
R9H13603 |
2025-12-31 |
$197.68 |
2 |
|
SO Company Inc UK Global customer Paddington (CID-0031) |
TR47513 |
2025-12-31 |
$547.81 |
2 |
|
Gabe Corporation (CID-0037) |
IMT80020 |
2025-12-31 |
$6.14 |
2 |
|
Gabe Corporation (CID-0037) |
MEG5220-6033 |
2025-12-31 |
$7.72 |
1 |
|
Gabe Corporation (CID-0037) |
R9H13601 |
2025-12-31 |
$46.17 |
2 |
truncated: true (10 rows returned == max_rows; more transactions on 2025-12-31 or earlier may exist)