Direct Query script variables
You can use script variables to describe and manipulate the internal structure of a Direct Query app.
Use the drop-down to see a brief description and the syntax of each variable.
This variable allows an application to specify the age at which a cached query result will be considered stale.
The age is defined from when the result was first cached. If the age of a cached result is greater or equal to n seconds, it is considered stale and is not used as a cached result for a matching query. Instead, the query in question will be executed as if no cached result existed.
When the query executes again, its new result may be cached, depending on the current cache and memory state. If cached, it starts aging again until stale at n seconds.
The default value for this variable is 30. This means that the cached query result is considered stale after 30 seconds.
Value | Description |
---|---|
-1 |
This setting means that the cache is kept during the time the user is logged in. |
0 |
Caching is completely disabled. |
1-9,223,372,036,854,775,807 | Sets the cached result stale age in seconds. |
> 9,223,372,036,854,775,807 | Same as setting the variable to 30. |
DirectQueryResultCacheExpirySeconds=n;
This variable allows an application to specify the maximum number of rows that will be fetched per chart from the remote database. It does not affect any aggregation operations.
The default value for this variable is 1000. This means that some charts, for example a table, will not show more than 1000 row results even though the query to populate the chart resulted in 50,000 rows. You can adjust DirectQueryRowFetchMaxCount to fetch more rows from the database to show all data. If the variable has a value outside of the supported range, the default value of 1000 is used.
Value | Description |
---|---|
0 |
This setting fetches all rows dynamically, by performing an extra query to determine how many rows to fetch. Information noteAs this performs two queries for each load or selection instead of one, it can be more expensive regarding database performance and costs.
|
1-100,000 | Sets the maximum number of rows to fetch per chart from the remote database. |
> 100,000 | Same as setting the variable to 0. |
DirectQueryRowFetchMaxCount=n;