How to Limit Rows Returned at the Data Source Level in Bold BI
To improve performance and control dataset size in Bold BI, you can limit the number of rows returned at the data source level. This can be achieved using Threshold, Extract mode limits, or custom queries depending on your use case.
| Option | When to Use |
|---|---|
| Threshold | When you need a strict cap on returned rows for all queries |
| Extract Mode Maximum Rows | When limiting only the initial data load |
| Custom Query | When you want precise control using filters, aggregation, or row limits |
Methods to Limit Rows at the Data Source Level
Method 1. Limit rows using Threshold (recommended for Hard Limits):
Use the threshold setting to enforce a maximum number of rows returned by the data source.
-
Log in to the Bold BI application.
-
Go to Data Sources and Edit your data source (or create a new one).
-
In the data source designer, enable Code View using the toggle switch.
-
Enable the Threshold option and specify the maximum number of rows to return.
Note: This option can also be configured for data sources created using the REST API.
- Save the data source.
Method 2. Limit rows using Extract mode maximum rows (limits initial extraction only):
This method limits the number of rows retrieved during the initial data extraction only.
- Create a new data source for your SQL database.
- Choose Mode: Extract.
- Choose the maximum number of rows.
- Save the datasource.
Note; Only the initial extraction respects the configured row limit. Subsequent refreshes load the remaining data without applying this limit.
Method 3. Limit rows using a Custom Query (best when you can filter/aggregate):
Use a custom query when you need precise control over the returned dataset through filtering, aggregation, or row limiting.
- Edit/create a data source.
- Switch to Custom Query.
- Define a query that restricts the dataset using clauses such as
WHERE,TOP, orLIMIT - Preview and save.
- Verify the result:
- Use the Preview option in the data source designer to verify the reduced dataset.
- Create a simple grid widget to check record count and load performance.
- Refresh the data source to confirm that the limit is consistently applied.