External (Shared) Parameters

External (shared) parameters are stored outside a graph in a separate file within the project folder. External (shared) parameters are suitable for parameters used by multiple graphs.



If you would like to give someone your graph, do not forget to include a file with external graph parameters. It is the same as with metadata and connections.

Creating External Parameters

  1. Right click Parameters in Outline and select Parameters > New parameter file from the context menu.
434
  1. Select the location and name of the new parameter file. Confirm the name by the OK button.

  2. Parameter file appears in your project and the file is already linked into your graph. Just double-click the empty parameter file and add some new share external parameters.

Linking External Parameters

Existing external (shared) parameter files can be linked to each graph in which they should be used.

  1. Right-click either the Parameters group or any of its items.

  2. Select Parameters > Link parameter file from the context menu.

434
  1. Locate the desired parameter file from the files contained in the project (parameter files have the .prm extension).

Internalizing External (Shared) Parameters

You can internalize any linked external (shared) parameter files into internal parameters.

  1. Right-clicking some of the external (shared) parameters items in the Outline pane and select Internalize parameters from the context menu.

  2. The linked external (shared) parameters disappear from the Outline pane. Parameters group and the newly created internal parameter items appear at the same location.

The original external (shared) parameter files still remain in the project and can be seen in the Project Explorer pane (parameter files have the .prm extension).

448

XML Schema of External Parameters

External graph parameters are serialized in XML format with following schema:

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/GraphParameters"
    xmlns:tns="http://www.example.org/GraphParameters" elementFormDefault="qualified">

    <element name="GraphParameters" type="tns:GraphParametersType"></element>

    <complexType name="GraphParametersType">
        <sequence>
            <element name="GraphParameter" type="tns:GraphParameterType"
                maxOccurs="unbounded" minOccurs="0"></element>
        </sequence>
    </complexType>

    <complexType name="GraphParameterType">
        <sequence>
            <element name="attr" type="tns:attrType" maxOccurs="unbounded"
                minOccurs="0">
            </element>
            <choice>
                <element name="SingleType" type="tns:SingleTypeType"></element>
                <element name="ComponentReference" type="tns:ComponentReferenceType">
                </element>
            </choice>
        </sequence>
        <attribute name="name" type="string" use="required"></attribute>
        <attribute name="value" type="string" use="required"></attribute>
        <attribute name="dynamicValue" type="string"></attribute>
        <attribute name="secure" type="boolean"></attribute>
        <attribute name="description" type="string"></attribute>
        <attribute name="public" type="boolean"></attribute>
        <attribute name="required" type="boolean"></attribute>
        <attribute name="label" type="string"></attribute>
        <attribute name="defaultHint" type="string"></attribute>
        <attribute name="category" type="string"></attribute>
    </complexType>

    <complexType name="ComponentReferenceType">
        <attribute name="referencedComponent" type="string"></attribute>
        <attribute name="referencedProperty" type="string"></attribute>
    </complexType>

    <complexType name="SingleTypeType">
        <attribute name="name" type="string"></attribute>
    </complexType>

    <complexType name="attrType">
        <attribute name="name" type="string"></attribute>
    </complexType>
</schema>

For example:

<?xml version="1.0" encoding="UTF-8"?>
<GraphParameters>
    <GraphParameter name="PROJECT" value=".">
        <attr name="description">Project root path</attr>
    </GraphParameter>
    <GraphParameter name="CONN_DIR" value="${PROJECT}/conn">
        <attr name="description">Default folder for external connections</attr>
    </GraphParameter>
    <GraphParameter name="DATAIN_DIR" value="${PROJECT}/data-in">
        <attr name="description">Default folder for input data files</attr>
    </GraphParameter>
    <GraphParameter name="DATAOUT_DIR" value="${PROJECT}/data-out">
        <attr name="description">Default folder for output data files</attr>
    </GraphParameter>
    <GraphParameter name="DATATMP_DIR" value="${PROJECT}/data-tmp">
        <attr name="description">Default folder for temporary data files</attr>
    </GraphParameter>
    <GraphParameter name="GRAPH_DIR" value="${PROJECT}/graph">
        <attr name="description">Default folder for transformation graphs (grf)</attr>
    </GraphParameter>
    <GraphParameter label="Public parameter" name="PUBLIC_PARAM" public="true" required="true" value="default value">
        <SingleType name="multiline"/>
    </GraphParameter>
</GraphParameters>