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.

--test-data-set name

Measure Factory only (requires Measure Factory license).

Build a data set after making changes without running the entire factory. Use one or more occurrences of this option with different arguments to specify multiple data sets. This option works just like --data-set except it will not check to see if the factory configuration script has changed.

For example:

spectre measures /config/cfg.factory --test-data-set "Charges" --test-data-set "Hourly Census"

NOTE: --test-data-set and --data-set are mutually exclusive.

--skip-test-dive

Measure Factory only (requires Measure Factory license).

Skip the final test Dive normally run at the end of a factory build. Skipping the Dive when performing partial builds as part of a background Production run saves time.

For example:

spectre measures /config/cfg.factory --test-data-set "Overrides" --skip-test-dive

NOTE: This option is available starting with Spectre 7.1(18).

--output-folder

Measure Factory only (requires Measure Factory license).

Specifies a custom folder to use instead of factory-output. This is intended to be used with a parametrized factory.

spectre measures /config/cfg.factory --output-folder <path>

--temp-folder

Measure Factory only (requires Measure Factory license).

Specifies a custom folder to use instead of factory-output. This is intended to be used with a parametrized factory.

spectre measures /config/cfg.factory --temp-folder <path>

-j [ --jobs ] arg

Specify the maximum number of measure files to process in parallel. The default number of jobs is 1, which means that the measures command will run single threaded.

For example, this sets the number of parallel jobs to 5:

spectre measures/measures/sales.measures --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.

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.