Edit Schema

Setting of input and output schema

Schema of connector

Some connectors automatically generate schemas of input/output data used in mapping definition, while schema of other connectors need to manually set.

 

Connector automatically generating schema

Mainly Table model type connector.

A proper schema is automatically generated according to the property settings of the connector.

Because the schema is automatically changed when the property is modified, you don't need to change it manually.

Therefore, the schema is unable to be edited basically.

 

Connector requiring manually schema setting

Mainly XML type connector.

A schema must be set in the Mapper editor screen for mapping nodes.

To edit a schema, select Load schema from components/files or Load schema from resources on the right-click menu of the schema.

Edit a schema as needed after loading a schema or adding a root element.

Schema types

The type of input and output schema depends on the type of input and output component.

The type used in Mapper is the same as the internal data type.

For example, for database-type connectors, data types are shown in the format of "<Native type> (<internal data type>)" in Type of [Schema definition] in the property.

Mapper exchanges data using the internal data type of this format.

Loading schema

To load a schema, select Load schema from components/files or Load schema from resources on the right-click menu of the component icon found under InputData or Output Data.

A schema can be selected from components, XML files, or schema files.

 

Selecting a method to load a structure

Item description

Item name

Description

Remarks

Select from component

Sets an output schema of the selected component.

  • You can select the only component that holds an output schema.

    (Example: Read CSV File, Read XML File)

  • The output schema is loaded if a component that holds both input and out schema is selected.

    (Example: Mapper)

Load from XML file

Sets a schema based on the specified XML file.

The Browse button launches a file chooser that allows you to select a file.

    Note
    • Specify an absolute path of HULFT Square Storage for the file path.

    • The restricted characters of HULFT Square Storage except for path separator "/" can't be used.

Load from DTD file

Sets a schema based on the specified DTD file.

The Browse button launches a file chooser that allows you to select a file.

    Note
    • Specify an absolute path of HULFT Square Storage for the file path.

    • The restricted characters of HULFT Square Storage except for path separator "/" can't be used.

    • A schema file including the external reference of ENTITY can't be used.

Adding a root element

To add a root element, click Add root element on the right-click menu of the component icon found under InputData or Output Data.

= Hint =

Add root element is activated only when a root element doesn't exist in a schema.

Edit menu

The following operations can be performed from the right-click menu of each element.

The menu items vary depending on whether the root element or another element is selected.

Description of each menu

Item name

Element (root element or other element)

Description

Remarks

Edit

Common

Edit the element name, namespace, and comment.

 

Add

Child element

Root element

Adds child elements.

 

Attribute

Root element

Adds an attribute.

 

Cut

Elements other than root element

Cuts the schema.

 

Copy

Elements other than root element

Copies the schema.

 

Paste

Common

Pastes the cut/copied schema.

 

About Index (predicate)

"Index (predicate)" is used to specify each node of XML with XPath expression.

In elements of the input schema, not only "element name" and "comment" but "index (predicate)" can also be specified.

For example, if the index of the table/row/column element is specified as "2", the second column element in the row element is specified.

Using XPath expressions allows you to write various conditions to specify elements flexibly.

Note

Specify an index if several elements with the same name exist.

= Remarks =

For details, refer to "XPath specification" (http://www.w3.org/TR/xpath).

Specification limits

  • Character restrictions of element name

    • Element names of schemas (DTD) cannot use the following characters:

      "\" "/" ":" ";" "*" "?" "'" """ "<" ">" "|" "~"

      = Remarks =

      For details, refer to "W3C XML 1.0 Specification" (http://www.w3.org/TR/xml/).

  • Input schema of Variable Mapper

    • Variable Mapper displays all connectors with result data in the script canvas in Input source and the display method depends on the mechanism of the connector.

      The display methods are shown below.

      A schema mapped to a variable in Output Destination on Variable Mapper is always displayed because the mapping information is saved in Variable Mapper.

      Data model

      Component name

      Action

      Table model type

      (Connector automatically generating schema)

      CSV Connector, etc.

      The schema is always displayed.

      Table model type

      (Connector loading a schema definition from a connection resource)

      Fixed-length connector, variable-length connector, etc.

      A schema needs to be loaded explicitly each time when project is opened, in ways such as selecting the connection resource again.

      XML type

      (Connector requiring manually schema setting)

      XML Connector, etc.

      A schema needs to be loaded explicitly from Load schema from components/files or Load schema from resources using Mapper when a project is opened.

      XML type

      (Connector loading a schema definition from a connection resource)

      Web Services connector, etc

      A schema needs to be loaded explicitly each time when project is opened, in ways such as selecting the connection resource again.

      XML type

      (Connector automatically generating schema)

      FTP Connector, etc.

      The schema is always displayed.

Notes

  • Set an input data schema with the same structure as the schema defined in the input source of Mapper.

    The value of the input data may not be retrieved correctly if the schemas are different.