The command line processor sacl

Content

The command line processor sacl
XML analysis task specifications
Examples


The command line processor sacl

Based on an XML interface, Synop Analyzer can be used as an analysis kernel within automated workflows or batch processes, or as a plugin component embedded into third-party software. To that purpose, the Synop Analyzer command line processor (sacl.bat) can be used. It processes an analysis task - submitted in the form of an XML document - without user interaction.

sacl.bat can take 1 or 2 command line parameters:

The result of calling the command line processor can either be a transformed version of the input data or an analysis result in the form of a report (HTML or PDF), a spreadsheet (.xlsx) with tabular and graphical information, a data table or a data mining model. The following picture shows this schematically:

task automization with Synop Analyzer


XML analysis task specifications

XML tasks according to the XML schema http://www.synop-systems.com?/xml/InteractiveAnalyzerTask.xsd are described in detail in The Synop Analyzer XML Application Programming Interface.


Examples

A simple task, which reads the flat file kunden.txt from the subdirectory doc/sample_data of the Synop Analyzer installation directory, creates a value distribution statistics and chart for each data field and writes the result to a spreadsheet called kunden_stat.xlsx, is given below:

  <?xml version="1.0" ?>
  <InteractiveAnalyzerTask>
     <InputData>
        <InputDataLocator usage="DATA_SOURCE" type="FLAT_FILE"
           name="doc/sample_data/kunden.txt"/>
     </InputData>
     <UnivariateExplorationTask nbChartsPerRow="3">
        <ResultDataLocator usage="IA_REPORT" type="OOXML_SPREADSHEET"
           name="doc/sample_data/kunden_stat.xlsx"/>
     </UnivariateExplorationTask>
  </InteractiveAnalyzerTask>

If you store this task as kunden_task1.xml and create a batch file kunden_task1.bat containing the line of text sacl kunden_task1.xml, then you can call kunden_task1.bat from command line, from a shell script or a scheduled service or workflow or by mouse click in order to execute the specified task without any further user interaction.

You could also submit the XML task directly as a textual string when calling sacl. In this case, however, you have to 'quote' the task by enclosing it into double quotes. The existing double quotes within the string have to be masked by backslashes (\) in this case. The call would then look like this:

  c:> SynopAnalyzer.bat "<?xml version=\"1.0\" ?><InteractiveAnalyzerTask>
  <InputData><InputDataLocator usage=\"DATA_SOURCE\" type=\"FLAT_FILE\"
  name=\"doc/sample_data/kunden.txt\"/></InputData>
  <UnivariateExplorationTask nbChartsPerRow=\"3\">
  <ResultDataLocator usage=\"IA_REPORT\" type=\"OOXML_SPREADSHEET\"
  name=\"doc/sample_data/kunden_stat.xlsx\"/></UnivariateExplorationTask>   </InteractiveAnalyzerTask>"