Spectre measures Options
The Spectre command line measures sub-command builds multiple Measures cBases and cPlans, or Measure Factory compiled output data sets. It has the following syntax:
spectre measures <filename> [options]
The <filename> points to an existing Measures (measures) or Measure Factory configuration (factory) file to direct the build. The Measure Factory configuration file requires a Measure Factory license.
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 /measures/sales.measures. 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 filesystem path such as C:\di\project\sales\measures\sales.measures, or use sales.measures if the current working directory is already C:\di\project\sales\measures.
For example:
spectre measures /measures/sales.measures
spectre measures /config/cfg.factory
Enter spectre measures -h to display the syntax and options as shown in the following table.
Spectre Measures Subcommand Options
Option | Description |
---|---|
--dataroot arg |
Set the path to the DiveLine server dataroot. For example: spectre measures /measures/sales.measures --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 measures /measures/sales.measures --project sales Instead of using this option, you can set the DI_PROJECT environment variable. See Setting Environment Variables. |
-p [ --param ] name value |
Set a value for a parameter. For example: spectre measures /measures/sales.measures -p month 12 -p year 2015 |
-q [--quiet] |
Print only warnings and errors to the console. For example: spectre measures /measures/sales.measures --quiet |
--dry-run Measure Factory only (requires Measure Factory license). |
Validate the factory configuration and report any issues, but do not build the factory. For example: spectre measures /config/cfg.factory --dry-run |
--nitpick Measure Factory only (requires Measure Factory license). |
Run some extra-strict checks for possible configuration problems. The run finds things that are not necessarily problems, but might be helpful in cleaning things up. For example: spectre measures /config/cfg.factory --nitpick |
--data-set name Measure Factory only (requires Measure Factory license). |
Limit which data sets are built. Use one or more occurrences of this option with different arguments to specify multiple data sets. This option is useful when you have previously built the factory, have not changed the configuration since the last build, and need to regenerate specific data sets. The --data-set option is intended to support the specific use case for hourly census—to run a mostly-independent subset of the factory on a more frequent basis than a full build. For example: spectre measures /config/cfg.factory --data-set "Charges" --data-set "Hourly Census" Use caution to include any data sets that are dependent, by link rules, upon the ones you rebuild. NOTE: Rebuilds only the specified data set(s), but only if the factory config has not changed. If the config changed, then it rebuilds the whole factory to ensure that the output is consistent. TIP: Rebuilding a particular data set processes all of the builds for that data set, but does not re-run steps that would depend on data from that data set. It constructs the list of steps in the same was as if it is running the whole factory, but then it only runs the steps for the given data-set. |
NOTE: When running factory files in a project, only one instance of spectre measure can run at a time—the second occurrence ends with an error message.
The following command assumes that the environment variable PATH includes the location of the Spectre executable file.
spectre measures /config/cfg.factory --project mf_hospital --data-set "Hourly Census" --data-set "Previous Hourly Census" --data-set "Squashed Previous Hourly Census" --data-set "Census Capacity" --dataroot E:\di\mf_main\live\dl-dataroot
This command builds a selection of datasets from a factory.