Importing and Exporting Terms

Overview

You can import lists of terms into SAS Business Data Network. This feature enables you to add any number of terms to SAS Business Data Network without having to add them individually. You can include them in a file. You can also export selected terms from SAS Business Data Network. The exported terms can be imported into other SAS Business Data Network installations.
The import and export files share an identical XML-based format and must support UTF-8. The terms contained in the files cannot exceed 100 characters in length. Issues can occur when the terms that you import contain characters outside of the character set that has been configured for your database.
You can export a short list of terms from SAS Business Data Network and review the file to examine the XML structure. Then you can use the file that you created in the export as a template for importing additional terms. You can review a sample XML file in the Export Terms Export Terms section.
The .xsd schema for SAS Business Data Network term imports and a sample term XML import file are available in the share directory in the DataFlux Web Studio installation. The .xsd schema is named relationshipobjects.xsd, and the sample term import file is named bdntermimport_sample.xml. Instructions for verifying your XML with the schema are available at many Internet websites.

Description of Resource Types

The available resource types for the XML files used for importing and exporting terms in SAS Business Data Network are listed in the following table:
Resource Type
Description
BDNTERM
The term listed in SAS Business Data Network. Each term is required to have a unique identifier in the Identity attribute. Terms cannot be longer than 99 characters and are case insensitive.
BDNTERMREF
A reference to a SAS Business Data Network term. The term can exist in the SAS Business Data Network database, or somewhere within the import XML document. The BDNTERMREF Resource must be contained within a dependency element. Any term references occurring outside of a dependency element are ignored.
BDNTAG
Tags associated with the term (displayed in the Tags field in the Identification tab).
BDNNOTE
Notes associated with the term (displayed in the Notes section of the Notes and Contacts tab).
BDNCONTACT
Contacts associated with the term (displayed in the Contacts section of the Notes and Contacts tab).
BDNATTRIB
Attributes associated with the term (displayed in the Attributes field in the Identification tab).
BDNACCOUNT
A reference to an account that is connected to a contact. This reference type is ignored if not related to a BDNCONTACT.
BDNROLE
A reference to a role that is connected to a contact. This reference type is ignored if not related to a BDNCONTACT.
URI
A URI for a link associated with the term (displayed in the Links field in the Identification tab).

Import Terms

To import terms from an XML file:
  1. Display the main window for SAS Business Data Network, if you have not done so already.
  2. In the Action menu beside the New Term icon, select Import Terms. An Import Terms window is displayed.
  3. Navigate to the folder that contains the XML file to be imported.
  4. Select the XML file. The file that you select must have an .xml extension.
  5. Click Open. The terms in the file will be imported into the current SAS Business Data Network.
Note that when a term is imported that already exists in SAS Business Data Network with the same name and same ancestry, the existing term's history is maintained. This behavior enables you to roll back to the pre-imported version of the term. The imported term completely replaces the old term in every other regard. Therefore, the imported term must be a complete definition of the term with all the attributes and dependencies (such as related terms, associated items, notes, and tags) defined as they are expected to appear in SAS Business Data Network.
The original term's children are still maintained. Disassociate a child term with a parent term through import by importing the child term with a different "P" type dependency or no "P" type dependency at all.

Export Terms

To export one or more selected terms to an XML file:
  1. Display the main window for SAS Business Data Network, if you have not done so already
  2. Select one or more terms in the panel on the right. You must select terms, or no terms will be exported.
  3. In the Action menu beside the New Term icon on the left, select Export Terms.
  4. Select XML File in the submenu. An Export Terms window is displayed.
  5. Click Save and select a location to save the file. Specify an appropriate name for the file.
  6. Click Save to write the file to the selected location.
The exported file will have the structure that is described in Description of Resource Types. The following display shows the beginning of a sample XML file.
This segment defines the first term, which is Warehouse:
XML File for Warehouse
XML File for Warehouse
The term Warehouse has a type of BDNTERM, with label and identity attributes set to the text "Warehouse." The identity attribute is required, but an empty label attribute can be filled with contents of the identity. This particular term contains attributes and values for Description, Requirements, Status, and Importance that populate fields on the Identification tab when the term is selected in SAS Business Data Network. The term contains a type A dependency, which can be used for related terms, tags, and links. In this case, the dependency connects the term to the Logistics tag, which has a resource type of BDNTAG.
The following display contains the next term that contained in the XML file:
Term with Type A Dependency
Term with Type A Dependency
Like Warehouse, Loading Dock and Mailroom are defined using the BDNTERM type, but the treatment of the identity attributes is different. In this example, the Loading Dock term is defined in relationship to the term Warehouse, in the form of the following code:
identity="Warehouse\Loading Dock"
. The relationship between the parent Warehouse and the child Loading Dock is reinforced by the use of a type D dependency between the two. The label and identity for the dependency are "Warehouse" and the resource type is "BDNTERMREF." When you export a term, you must also select the related terms, or those relationships will be lost. Direct descendants of a term are exported with the term.
The final section of the code contains yet another use of a dependency.
The term Section is defined in the code shown in the following display;
Another Type of Dependency
Another Type of Dependency
The parent and child relationship between Warehouse and Section is defined in the same way as the relationship between Warehouse and Loading Dock. It uses the identity attribute in the resource and the type D dependency. The Section term uses a type A dependency, just as Warehouse did, to connect the term to the Logistics tag (resource type BDNTAG). However, this time, the dependency also establishes a connection to Picking, which is a related term with a resource type of BDNTERMREF.

Export Terms to an Entity Definition

You can use the entity definition export feature to define one or more business terms with the correct attributes. Then, you can export that set of terms into an Entity Definition file that can be imported in Master Data Foundation projects or DataFlux qMDM. The same method can also be used to perform the following tasks:
  • Select a set of terms to create
  • Create qMDM metadata that enables the user to convert terms into attribute groups on existing entity definitions
Perform the following steps:
  1. Display the main window for Business Data Network, if you have not done so already.
  2. Select one or more terms in the panel on the right. You must select terms, or no terms will be exported.
  3. In the Action menu beside the New Term icon on the right, select Export Terms.
  4. Select Definition in the submenu. An Export Terms window is displayed.
  5. Click Save and select a location to save the file. Specify an appropriate name for the file.
  6. Click Save to write the file to the selected location.