Query Runner Step View

A Query Runner Step is used to generate a file for each result returned from running the main SQL Wrapper associated with the Query Runner. These files are generated by Runner Handlers (standard ones are SQL Wrappers or Reports, but can be extended with custom entities through the API). This provides an easy way to produce multiple reports using different parameters automatically from a single Query Runner execution.

Query Runner Step Features

A Query Runner Step is responsible for determining which Runner Handler to use for the step, and the name of the file to be generated by the system.

A Query Runner Step can be setup to run any Query Runner Handler (See API Documentation for more information). This is to allow for extending this functionality through the API. The default Query Runner Handlers in the system are:

  • SQL Wrappers
    Configuring a SQL Wrapper in a Query Runner Step will result in the query runner producing a csv file for each execution.
  • Reports
    Configuring a Report in a Query Runner Step will result in the query runner executing the configured report and producing a generated file.

If all the Step(s) in a Query Runner are SQL Wrappers, and there is only one Step, or only one row result from the main Query Runner SQL Wrapper, then this can be opened in an excel file (including allowing our Data Templates) with a sheet for each step, or row.

When you select a Runner Handler the system will automatically process the handler, and load in all the parameters that are required to run it. These parameters are automatically loaded as Query Runner Step Parameters, that you can then configure with values that should be used when the step is being executed.


Query Runner Step Properties

Query Runner Steps have the following properties:

NameDescription
[Key]
Name
The user friendly unique name for this step within the parent Query Runner
Runner Handler TypeThe type of handler this step will use to generate a file with.
By default the system has a SQL Wrapper, or Report as valid handlers.
Custom handlers can be added through our API (See Documentation for more information)
Runner HandlerThe instance of the Runner Handler Type that will be used to generate the resulting file
Generated Step Name Formula

A formula used to dynamically generate the unique name of the file for this Step execution. You should make sure the file names can not clash regardless of the SQL Wrapper results.

DescriptionA user friendly description for this Step

The Generated Step Name Formula works against the Formula Functions With Query Runner Results context (see API for more information). This allows you to perform all standard formula functions along with accessing the SQL Wrapper results, like the following:

GetRunnerResult("MySQLWrapperResultName")

The formula builder window shows the properties and Query Runner functions available, along with their uses.

You should make sure the generated file name is always unique. The default file name is:
QueryRunnerStep.Name + "_" + RunnerExecutionRowNumber.ToString()


Commands

A Query Runner Step has the following custom commands:

  • Formula
    Provides a formula builder window for the Generated Step Name Formula value.
  • Reload Parameters
    Reloads all the Query Runner Step Parameters from the Runner Handler for this Step. Correct parameters will not be overwritten, but missing parameters will be added, and invalid ones will be deleted.