Spectre Command Line Syntax

You can run Spectre commands from a command line. By default, spectre.exe is installed in the DiveLine server bin directory, for example, C:\di\solution\diveline\bin or /di/solution/diveline/bin. If this directory is not in your system PATH environment variable, navigate to it to run Spectre with the following usage:

spectre <subcommand> [options]

Spectre command line functions include:

  • Building Spectre data files
  • Managing the cache on the DiveLine server
  • Printing metadata about the data files such as column types, string tables, and logs
  • Performing simple dives from the command line as well as complex dives from scripts
  • Printing metadata about data views such as what calculations are present and which files are needed

In order to run Spectre commands, you need to specify the DiveLine server dataroot and the Project name. You can use the system PATH environment variable or the subcommand options to pass this information to Spectre. See Setting Environment Variables or the options in each subcommand.

Use the Spectre command line syntax when you include Spectre builds and queries in scheduled Production scripts. See Production Overview.

The available sub commands are:

  • build—Build a cBase
  • cache—Manage the Spectre cache
  • cbaseinfo—Retrieve information about a cBase
  • cplaninfo—Retrieve information about a cPlan
  • dive—Perform a dive into the data
  • generate—Generate a Build script
  • measures—Generate cBases and cPlans for measures data
  • project—List, create, install, and uninstall projects as well as change a project's dataroot
  • scramble—Mask sensitive data so it can be shared for debugging purposes

For information about Spectre, use the following commands:

  • Enter spectre help or spectre -h to display basic usage.
  • Enter spectre <subcommand> help or spectre <subcommand> -h to display usage for any sub-command. For example, enter spectre build -h to display options for the build sub-command.
  • Enter spectre -v to display the version of Spectre.
  • Enter spectre --licenses to display third party software license information.
  • Enter spectre functions --list to display a list of supported functions.
  • Enter spectre functions --describe <function> to display details about a particular function.

NOTE:

  • Output defaults to stderr including all log messages.
  • Normal output for Dive results goes to stdout.
  • You can redirect the console output using the ">" character on the command line.

See also: