Spectre build Options
The Spectre command line build sub-command builds a cBase. It has the following syntax:
spectre build <filename> [options]
The <filename> points to an existing build 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.build. 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.build, or use sales.build if the current working directory is C:\di\project\sales\build.
For example:
spectre build /build/sales.build
Enter spectre build -h to display the syntax and options as shown in the following table.
Spectre build Sub-command Options
Option | Description |
---|---|
--dataroot arg |
Set the path to the DiveLine server dataroot. For example: spectre build /build/sales.build --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 build /build/sales.build --project sales Instead of using this option, you can set the DI_PROJECT environment variable. See Setting Environment Variables. |
-l [ --limit-rows ] arg |
Limit the number of output rows for each input. For example: spectre build /build/sales.build --limit-rows 500 |
-o [ --output ] arg |
Override the output file path in the Build script. For example: spectre build /build/sales.build -l 500 --output /cbases/sales_500.cbase If not set, the output defaults to the output location that is specified in the Build script. |
-j [ --jobs ] arg |
Specify maximum number of text files to parse in parallel. For example: spectre build /build/sales.build --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. For more information about multiple text input objects, see Text, cBase, and Dive Input Build Tags. This option spreads out multiple text files of a single text-input. For example, if the build input is: text-input "a.txt" "b.txt" "c.txt" Spectre spreads (by file size, not by the number of files) the parsing of a.txt, b.txt and c.txt over the available core processors as it builds the cBase. This option can also spread out the work of adding columns and doing lookups. NOTE: If the Build script lists the files by using individual text-input tags, they do not build in parallel. |
-p [--param ] name value |
Set a parameter. For example: spectre build /build/sales.build --param month 01 --param year 2015 |
--timing |
Print timing information. For example: spectre build /build/sales.build --timing |
-q [ --quiet ] |
Print only warnings and errors to the console. For example: spectre build /build/sales.build --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. |
--temp-directory |
Set the directory location for saving Spectre temporary files. If not set and the Build script is in a Project and that Project has a "/temp" folder, use that folder. Otherwise, use the system temp directory and include the path in a message to the console. |
--test-mode | Run a build without the including the log in the cBase. This option helps with comparison of outputs. |
The following command assumes that the environment variable for DI_HOME is set to the DiveLine server dataroot and the Build script is saved in the project's programs folder.
D:\DI\Solution\diveline-7000\bin\spectre.exe build /programs/bugzilla.build
--project "Bugzilla Factory" --output /cbases/BUGS.cbase
The Build script specifies the location of the inputs and output, but the --output option overrides the destination for the cBase.