Define export mapping - SmartPlant Foundation - IM Update 46 - Help - Hexagon

SmartPlant Foundation Help

Language
English
Product
SmartPlant Foundation
Search by Category
Help
SmartPlant Foundation / SDx Version
10
SmartPlant Markup Plus Version
10.0 (2019)
Smart Review Version
2020 (15.0)

The target system data model forms the basis for the export mapping process in Data Validator. The export process uses a defined mapping, based on the structure of the target system, to manage loading data into the target system.

The data to be exported must match the data in the target system database using any one of three parameters:

  • Unique ID

  • Unique key

  • Query definition

By default, Data Validator identifies objects in the target system using the UID constructed in the staging area and the class definition specified in the export map. Sometimes, however, the UIDs for a specific type of object in a target system cannot be constructed or predicted from the data provided in a CSV file. In that case, you can use a target system unique key or a query definition to specify how to identify the object in the target system.

ObjectIdentification

Mapping with Unique ID

Objects can be identified by the unique ID when it is specified in the class definition for both staging and target systems. The unique ID is specified during the import mapping. For more information, see Define import mapping.

Example 1: A tag object with a unique ID “Tag”, .TagName is created as “Tag_P100” in the staging and target systems, where Tag is the prefix and P100 is the tag name.

In this case, the Target system Unique Key and the Target System Query Definition are not required to be specified, as Data Validator uses the Unique ID to identify and match the objects.

The above example contains the unique key with prefix and object property, but it may also contain properties expanded through relationships.

Example 2: A tag object with a unique ID, “Tag”, “+TagAreaRel.Name”, .TagName, is created as “Tag_Area1_P100” in the staging and target systems. Here, the Tag is the prefix, Area1 is the name of the area to which the tag is related, and P100 is the tag name. In this case, there can be two tags with the same name, but the area is the property that adds uniqueness.

Mapping with unique key

Objects with a unique key specified in the class definition instead of a unique ID can be identified by the unique key. You must ensure that the unique key value is specified in the Target System Unique Key text box during export mapping.

Example: A tag object with a unique key, “Tag”, .TagName is created as “Tag_P100” in the staging and target systems or a tag object with a unique key “Tag”, “+TagAreaRel.Name”, .TagName is created as “Tag_Area1_P100” in the staging and target systems.

Mapping with Query definition

Some class definitions may not have a unique ID or a unique key specified or you may want some more control in identifying the target objects by expanding the relationships and matching properties.

Example: A simple query definition can be constructed with tag name and name of the area to which the tag is related. For example, .Name, +TagAreaRel.Name. A more complex query definition would be required if the tag is related to a document as well as the area. For example, .Name, +TagAreaRel.Name,+TagDocumentRel.Name. Data Validator will query for an object in the target system with the .Name as the name of the object having relationships to the area and the document.

For more information on unique keys and query definitions, see Define target system unique keys and query definitions.

SHARED Tip If you have two target systems that use the same model or schema, they can share the same export mapping.

Stage to Target Mapping

You can export data to a target system by mapping the imported staging area data objects to the existing objects, properties, relationships, and relationship properties found in the target system. You can manually configure the export mapping for each object in the imported data, or you can automatically generate the export mapping from the target system by selecting the Auto Generate Export Mapping option when you create a new import definition. The export mapping can be further refined for each stage object to target object mapping by selecting specific property-to-property, relationship-to-property, relationship-to-relationship, and relationship property-to-relationship property mappings.

You can view, edit, or create export mappings from the main toolbar list box by selecting Export Mapping. The details of the export mappings are displayed in two panes.

  • Export Mapping - This pane details all of the existing export mappings as a list with three columns, Name, Description, and Target System. To open the details of a stage to target object map, select an export mapping in the Export Mapping pane.

    SHARED Tip The Description column is automatically set to Auto generated if the Auto Generate Export Mapping option is selected for the import definition.

  • Stage to Target Object Map - This pane displays the details for a selected stage to target object mapping in three columns; the stage object, the target object to which it is mapped, and the object weight.

You can access and refine the properties of a stage object in the list by selecting one of the property-to-property, property-to-relationship, relationship-to-relationship, or relationship property-to-relationship property mapping commands located on the Stage Object To Target Object Map toolbar. For more information, see Define stage object to target object mappings.

  • When mapping, you can only use Check File Exists or Check Target Exists as an action on an object, you cannot use both.

  • When any export mapping is deleted that contains class definitions, property definitions, relationship definitions, or relationship property definitions that are no longer used by Data Validator, those schema items are automatically removed from the database.

  • The object, property, relationship, and relationship property mapping names can include underscore and alphanumeric characters.

What do you want to do?