Spectre cbaseinfo Options
The Spectre command line cbaseinfo sub-command displays information about a cBase. It has the following syntax:
spectre cbaseinfo <filename> [options]
The <filename> points to an existing cBase 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 /cbases/sales.cbase. 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\cbases\sales.cbase, or use sales.cbase if the current working directory is C:\di\project\sales\cbases.
For example:
spectre cbaseinfo /cbases/sales.cbase
Enter spectre cbaseinfo -h to display the syntax and options as shown in the following table.
Spectre cbaseinfo Sub-command Options
Option | Description |
---|---|
--dataroot arg |
Set the path to the DiveLine server dataroot. For example: spectre cbaseinfo /cbases/sales.cbase --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 cbaseinfo /cbases/sales.cbase --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 when using --data or --calendar-data. For example: spectre cbaseinfo /cbases/sales.cbase --limit-rows 500 --data |
--properties |
Print property values. For example: spectre cbaseinfo /cbases/sales.cbase --properties |
--hash | Calculate and display a hash. |
--verify-hash | Calculate a hash and check that it is equal to the stored hash. |
-check-sanity | Run various sanity checks. |
-q [ --quiet] |
Do not print program information. For example: spectre cbaseinfo /cbases/sales.cbase --quiet |
--human-readable |
Align columns in table output. This option is the default unless writing to a file. For example: spectre cbaseinfo /cbases/sales.cbase --human-readable --data > sales-data.txt NOTE: This option is intended for looking at small result sets—it is costly because of the layout required. |
Other modes (supply at most one): | |
-s [ --string-table ] arg |
List the string table for a given string column. For example: spectre cbaseinfo /cbases/sales.cbase --string-table Brand Returns a list of all strings in the Brand column. |
--data |
Print the entire data table or redirect to a file. For example: spectre cbaseinfo /cbases/sales.cbase --data Returns the entire data table. |
-c [ --calendar-info ] arg |
Get general information about the calendar for a given period column. For example: spectre cbaseinfo /cbases/sales.cbase --calendar-info Shipped Returns calendar information for the period column Shipped. |
--calendar-data arg |
Print the calendar table for a given period column. For example: spectre cbaseinfo /cbases/sales.cbase --calendar-data Delivered Returns the calendar table for the period column Delivered. |
-d [ --diag ] arg |
Get the value of the diagnostic property. For example: spectre cbaseinfo /cbases/sales.cbase --diag log Returns the log of running the cbaseinfo command. Available diagnostic properties include: log, program, program-command-line, program-version, program-name, project-name, project-root, script-path, script-text, script-timestamp, and timestamp. |
--diag-all |
Print names and values for all diagnostic properties. For example: spectre cbaseinfo /cbases/sales.cbase --diag-all Returns all diagnostic properties. |
The following command assumes that the environment variable PATH includes the location of the Spectre executable file.
spectre cbaseinfo --project PRs /cbases/test.cbase
--dataroot c:\di\solution\dl-dataroot
This command locates test.cbase in the PRs project, displays a count for rows, columns, and warnings, a list of dimensions in the order in which they appear in the cBase, and a list of other columns, that is, the info columns.