Limiting Query Records In Design Mode

“Is there a way I can limit the number of records returned from the Query source module in design mode?”

Suppose you have a Loadit package that contains a Query module.
When you open the package in design mode, the query will run and all the relevant records will be returned.
If the query returns a large number of records, you might have to wait a while for the query to complete.

The Query module does not have the ability to interpret your query, it just runs it “as is” and makes no attempt to apply the design subset setting.
However, you can use a dynamic expression within your query to conditionally return a subset of records in design mode but return all records when the package is executed.

For example, this query:

SELECT ??IIF([System].[ExecutionMode] = 1, “TOP 10”, “”)??
*
FROM
SalesData

will return 10 records when you’re designing the package, and return all of the records when your package is executed.