You can associate a single resource with more than one
data mapping table where each data mapping table has only some of
the attributes of a resource. With such associations you can get a
specific view of the resource. A data mapping table is linked to a
data mapping template so that the mapping of XML elements to a relational
table can be accessed.
Before you begin
A data mapping table must be associated with
a resource. Ensure that there are resources to which you can link
the new data mapping table.
About this task
To create a new data mapping table:
Procedure
- Click .
- Specify a name and description and click Next.
The name cannot contain spaces or special characters and must be unique
within the resource group to which the resource belongs. The description
is optional.
- Select the XML nodes you want to be used for defining the
XPath for the columns in the data mapping table. An XML node can be
associated with only one column of the data mapping table.
Note: You
can create table columns without any associated XPath. When a column
does not have an associated XPath, it is not tied to a specific data
source. A data mapping template with such columns can be reused for
any generic XML data source.
- If the container resource does not have a schema, specify
the XPaths of the selected nodes.
Note: You can create
valid table columns without specifying an XPath.
- Click Next.
- Create a template for the data mapping table:
- If you want to base your data mapping table on another template
that you can modify and want to initialize the template with the column
definitions of the selected template, select Create a new
template based on an existing template.
- If you want to reuse another template, select Choose
an existing template.
- If you want to create a template, select Create
a new template.
If there are no templates that you can base your new data mapping
table on, the Create a new template based on an existing
template and Choose an existing template options
are not available. If the container resource for the data mapping
table does not have a schema, you can select only Create
a new template. Note: Skip the next step if
you did not choose the Create a new template option.
- Specify a name and description. The name cannot contain
any special characters and must be unique within an XML data configuration
file. The description is optional.
- Define the mapping between the XML nodes and the relational
table:
- If the resource is associated with an XML schema, for each
table column, select an extractable node from the XML schema and click Create.
The XPath and the properties of the table columns are defined automatically.
You can change any of these values.
- If the resource is not associated with an XML schema:
- For each table column, select an extractable node from the XML
schema and click Create.
- Specify the XPath.
Note: You can create table columns without any
associated XPath. Columns without an XPath are valid columns and,
because they are not associated with a specific data source, are generic
in nature. If the table template contains such columns, it can be
reused for any XML data source.
- Specify the names of the table columns. The name of a column cannot
contain any special characters and spaces, and must be unique within
a template.
- You can modify the following elements: Type, Length, Precision,
Scale, Nullable, and Primary Key.
- Click Finish.