Spectre flow Options
The Spectre command line flow sub-command runs a Flow script. It has the following syntax:
spectre flow <filename> [options]
The <filename> points to an existing flow file. The <filename> can take various forms:
- If you set DI_PROJECT or pass --project as an argument, you can use a project path such as /build/sales.flow. This format always uses forward slashes regardless of the operating system.
- If you do not set DI_PROJECT and do not pass --project as an argument, you can use a file system path. For example, use C:\di\project\sales\build\sales.flow, or use sales.flow if the current working directory is C:\di\project\sales\build.
For example:
spectre flow /build/sales.flow
Enter spectre flow -h to display the syntax and options as shown in the following table.
Spectre flow Sub-command Options
| Option | Description |
|---|---|
| --dataroot arg |
Set the path to the DiveLine server dataroot. For example: spectre flow /build/sales.flow --dataroot c:\di\solution\dl-dataroot Instead of using this option, you can set the DI_HOME environment variable. See Setting Environment Variables. |
| --project arg |
Set the project name. For example: spectre flow /build/sales.flow --project sales Instead of using this option, you can set the DI_PROJECT environment variable. See Setting Environment Variables. |
| -u -[ --username ] arg | Run as the provided user. |
| -l [ --limit-rows ] arg |
Limit the number of output rows for each input. For example: spectre flow /build/sales.flow --limit-rows 500 |
| -j [ --jobs ] arg |
Specify maximum number of threads to use in parallel. For example: spectre flow /build/sales.flow --jobs 5 Use arg to set the number of core processors (likely between 2 and 8). Start with a lower number as this depends on the I/O capabilities of the host system. |
| --test | Use testing default values for parameters. |
| -p [--param ] name value |
Set a parameter. For example: spectre flow /build/sales.flow --param month 01 --param year 2015 |
| --timing |
Print timing information. For example: spectre flow /build/sales.flow --timing |
| -q [ --quiet ] |
Print only warnings and errors to the console. For example: spectre flow /build/sales.flow --quiet When the command runs with this option, no timestamps or individual processes display; only warnings and errors are output to the console. If successful, only the command prompt displays. |
| --human-readable | Aligns columns in table output for easier readability. |
The following command assumes that the environment variable for DI_HOME is set to the DiveLine server dataroot and the Flow script is saved in the project's programs folder.
D:\DI\Solution\diveline-7000\bin\spectre.exe flow /programs/bugzilla.flow
--project "Bugzilla Factory" --param year 2024
The Flow script runs as expected with the parameter "year" containing the value "2024".