Factory Plugin Configuration File Overview

A factory plugin runs an Integrator or Spectre Build script, which is written and tested separately, that can bring in additional columns for the factory to process into the output. The plugin can apply rules that the other factory rule types cannot run. The factory plugin configuration file (always called cfg.factory-plugin) is where you set up the plugin. To bring this additional information into the factory processing, a plugin tag is used within the data-set block of the factory configuration file.

The factory plugin configuration file has the following sections in the factory-plugin block:

  • name—Provides a name for the plugin.
  • description—Describes the purpose for the plugin.
  • input—Sets the input for the plugin by indicating which columns to bring in with column sub-tags.
  • integrator-script or build-script—Specifies the Integrator script or Spectre Build script to run.
  • output—Sets the output for the plugin by indicating which dimensions and columns to create, using dimension and column sub-tags, that ultimately become part of the data set where the plugin-rule is called.

A simple factory plugin file is shown here:

Plugin files must be located in the factory project in the plugins directory (project://<project name>/plugins/<plugin name>/). For example:

where to locate plugin scripts

The sample plugin is used in the cfg.factory file as shown here:

Plugin in Factory Config

This example adds the Concat plugin to the Accounts data set and performs the following processing.

  • Connects the Charges data set to the input of the plugin
  • Specifies Account ID as the Key
  • Specifies Revenue Description as the String
  • Specifies that, to merge the plugin output back into Accounts, match the output Key with Account ID
  • Calls the Concat result All Revenue Descriptions

NOTE: Version 7.1(13) introduces plugin-input for use in data sets.

See also: