What is a Spectre Dive?
A Spectre Dive is a query against a cPlan. It specifies a table of numbers to be returned from the cBase. You can use the simple, tabular results to validate data from within Workbench, as a substitute for a Marker file used by DivePort portlets, or as a means to determine totals, subtotals, and top n.
Spectre Dive files for cBases are equivalent to Marker files for classic Models, but with one key difference. Markers describe a query and how to present it. The presentation could be a graph, tabular, or report, each with multiple customizations. Dive files, on the other hand, only describe the query.
Dive files can be used in many different ways.
You can do simple queries without a Dive script with spectre dive <cplan> -f <filter> -d <dimension> -c <column>. For more complex queries, you need to write a Dive script and call the script. For example, spectre dive <dive-script>. You can also use command-line queries to validate the data in a cBase, or to test some queries before you put them on ProDiver, DiveTab or DivePort. See Spectre cplaninfo Options and Spectre dive Options.
Similar to the command-line query case, Dive scripts can be used to query cBases in Workbench by using the Run command. The resulting table appears in the Output panel.
Dives can be used to do fast squash operations as inputs to Integrator scripts. If you already have the cBase, it is much faster to do a Dive against that than to take the cBase as an input and run a squash node. Integrator cBase input can take dimensions and other_columns, which is roughly equivalent to the spectre dive <cplan>... invocation noted previously. But again, for more complex queries, writing a Dive script and using the dive input file type for the cBase object is necessary.
Most of the portlets that open Markers can also open Dive scripts—namely, Measures, Diver, and Indicator portlets. In some cases, it might be more convenient to write a Dive script than to make a Marker. For instance, Dive scripts can be easily read and edited by hand, and they can also do some things that Markers cannot, such as creating auxiliary rows for filtered totals. Using a Dive script in a portlet also avoids some performance overhead associated with Markers.
If your Marker or portlet does not look right, sometimes it is hard to tell where the problem is. If you set log_spectre_requests="TRUE" in your DiveLine's atlcfg.cfg file, then the DiveLine session logs will contain the Dive scripts used by the client to fetch data. You can then copy and paste those scripts with any text editor, run them on the command-line, and edit them to distill the test case and narrow down the problem. See Spectre Spectre Command Line Syntax.
See also: