Edit Schema

Set input and output schema

Schema of adapter

Certain adapters automatically generate input/output schema for mapping definition, while schema of other adapters need to manually set.

Adapter automatically generating schema

Mainly Table Model Type adapter.
Proper schema is automatically generated by the property settings of the adapter.
When property is modified, schema will also be automatically changed, so no need to change manually.
Therefore, the schema cannot be edited.

Adapter requiring manually schema setting

Mainly XML Type adapter.
Schema must be set in Mapper editor screen for mapping nodes.
Edition can be operated using right click menu on schema [Load schema], [Add root element], or [Load] in [Global Schema].
Edit schema as needed after reading schema or adding root element.

Schema types

The type of input and output schema depends on the type of input and output component.
Types used in Mapper is the same as Internal Data Type.

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

Load schema

To load a schema, click [Load schema] on the right-click menu of the component icon found under "Input data" "or Output data".
Selecting from components, XML files or schema files are available.

Selecting [Load schema] method

Explanation of item
Item name Description Remarks
Select from component Set the output schema of the selected components.
  • Only components that holds output schema are available
    (Example: Read CSV File, Read XML File)
  • Output schema is loaded if component that holds both input and out schema are selected.
    (Example: Mapper)
Load from XML file Sets the specified XML schema based on file.

Click [Browse] button to activate the file Selectr and Select the file.
Load from schema file Sets the specified DTD schema from a file.

Click [Browse] button to activate the file Selectr and Select the file.
  • Please specify an absolute path in the DataSpider file system.
  • Constrained Characters of DataSpider File System except for path separator "/" cannot be used.
  • A schema file including the external reference of ENTITY cannot be used.

Add root element menu

To add a root element, click [Add root element] on the right-click menu of the component icon found under "Input data" or "Output data".
[Add root element] is activated only when root elements do not exist in a schema.

Global Schema

To load, unlink, or register a global schema, click [Global Schema] on the right-click menu of the component icon found under "Input data" or "Output data".
[Global Schema] menu can only be displayed in document mapper.
Description of items
Item name Description Remarks
Load Load the specified global schema.
Unlink Unlink the referring global schema.
Register Register the schema as global schema.
  • In order to prevent from overwriting projects unintentionally, do not open multiple designers when you register a schema.
  • Before registration you should either save all the projects opened with designer or close them.
  • Once registration is completed, the schema refers the registered global schema.
  • For details, refer to "How to register from mapper editor".

Edit menu

The following operations can be performed within from the context menu appears when each element is right clicked.
The composition of the menu items varies depending which element is selected; root element or its child elements.
Description of each menu
Item name Element (root element or none root element) Description Remarks
Edit Common Edits element name, index and comment.  
Add Child element Root element Adds child elements.  
Attribute Root element Adds attribute.  
Namespace definition Root element Adds namespace declaration.  
Duplicate Equal Elements other than root element Adds exactly the same elements in the same hierarchy.
Edit accordingly after copy.
 
With first(second) positional specification (Set to predicate) Elements other than root element Automatically specifies position for the predicate, and adds elements.
If no predicate is [With first positional specification (Set to predicate)] will be displayed.
If the predicate is [With second positional specification (Set to predicate)] will be displayed.
 
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.  
Delete Elements other than root element Deletes the schema.  

About Index (predicate)

In the elements of the input schema, not only "element name", "comment" but "index (predicate)" can also be specified.
"Index (predicate)" is used to specify each node of XML with XPath expression.
For example, if the index of 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.
Specify index if several elements with the same name exist.
For details, refer to "XPath specification" (http://www.w3.org/TR/xpath).

Specification Limits

Notes