Open Manta Annotated Script Scanner Resource Configuration

Source System Properties

One connection or source system in Annotated Script Scanner corresponds to one project or package that is analyzed under one connection object.

New connections can be created in Manta Admin UI under the Connections tab. The connection configuration for Open Manta Annotated Script Scanner has the following structure.

Property name Description Example
annotatedscript.connection.id Name of the source system containing the scenario files for Annotated Script Scanner template
annotatedscript.resource.name Resource name for the analyzed technology Python
annotatedscript.annotationsFormat.path Path to the JSON file containing the configuration of the Manta annotations format for the analyzed technology ${manta.dir.scenario}/etc/annotatedscriptAnnotationsFormatPython.json
annotatedscript.script.encoding Input script encoding UTF-8
annotatedscript.includes.encoding Encoding of input scripts referenced by the @MANTAInclude annotation UTF-8

Common Properties

This configuration is common for all Annotated Script Scanner source systems and for all Annotated Script Scanner scenarios, and it is available on the Manta Admin UI screen under Configurations > CLI > Annotated Script > Annotated Script Common. Only the properties that you can safely edited are listed.

Property name Description Example
annotatedscript.input.dir Directory with the Annotated Script Scanner project/package. ${manta.dir.input}/annotatedscript/${annotatedscript.connection.id}
annotatedscript.includes.folder Name of the includes directory for script files referenced by the @MANTAInclude annotation. If it is in ${annotatedscript.input.dir} it is ignored as the projects/packages source sub-directory. includes
annotatedscript.includes.path Directory that serves as a root for searching scripts included by the @MANTAInclude annotation. ${annotatedscript.input.dir}/${annotatedscript.includes.folder}
annotatedscript.connections.file Name of the file that contains the connection ID configuration. connectionsConfiguration.prm
annotatedscript.connections.path Path to the file that containt the connection ID configuration. ${manta.dir.input}/annotatedscript/${annotatedscript.connections.file}
annotatedscript.resourceTypes.file File that contains resource type definitions. ${manta.dir.scenario}/etc/annotatedscriptResourceTypesConfiguration.csv
filepath.lowercase Whether paths to files need be lowercase (false for case-sensitive file systems, true otherwise). true
false

Preparing Data for the Provided Packages/Projects

Packages/projects have to be stored in the file system in the proper location.

  1. Create a new Annotated Script Scanner connection.
  2. Create the <annotatedscript.input.dir> directory (typically located at manta/cli/input/annotatedscript/<annotatedscript.connection.id>/) and place all the script files there (typically for Python .py). The required structure using custom sub-directories can be used.
  3. Create the <annotatedscript.includes.path> directory (typically located at manta/cli/input/annotatedscript/<annotatedscript.connection.id>/includes/) and place all the input scripts referenced by the @MANTAInclude annotation there. The required structure using custom sub-directories can be used.
  4. Create the <annotatedscript.connections.path> file (typically located at manta/cli/input/annotatedscript/connectionsConfiguration.prm) that contains the connection ID configuration as described in Open Manta Annotated Script Scanner Usage.

Language Format Configuration JSON File Structure

This configuration file defines how Automatic Data Lineage finds annotations and queries in the input script. Typically, a separate configuration file is needed for each host language analyzed.

Example of a language format configuration JSON file containing all allowed constructs:

{
  "commentLocators": [
    {"locatorType": "LINE", "commentDelimiter": "#"},
    {"locatorType": "BLOCK", "startDelimiter": "/*", "innerLinePrefix": "*", "endDelimiter": "*/"}
  ],
  "queryLocators": [
    { "locatorType": "REGEXP", "queryRegExp": "\"\"\".*\"\"\"",
      "queryTranslators": [
        { "translatorType": "LOOKUP",
          "lookup": [
            ["\"\"\"", ""]
          ]
        },
        { "translatorType": "REGEXP_REPLACEALL", "regex": "^\\\\x([A-Fa-f0-9]{2})", "replacement": "\\\\u00$1"},
        { "translatorType": "AGGREGATE",
          "translators": [
            {"translatorType": "OCTAL_UNESCAPER"},
            {"translatorType": "UNICODE_UNESCAPER"}
          ]
        },
        {"translatorType": "JAVA_STRING_UNESCAPER"}
      ]
    },
    { ... }
  ]
}

Where:

Example Configuration for Use in Java Source Code

Provided files:

Requirements: