Importing and Exporting Terms in XML

Overview

SAS Business Data Network supports the following XML-based import and export operations:
The XML-based import files and the 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 Exporting Terms to an XML File.
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.
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 on the Identification tab).

Importing 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.
  3. Select or clear the Publish import results to relationships service? check box in the Import Terms window.
    The check box and its explanatory message are shown in the following figure:
    Publish to Relationships Service
    Publish to Relationships Service
    Clearing this check box prevents the import operation from publishing import results to the Relationship service. This approach improves performance when you import a large XML file. If relationships are not updated, the terms and tags in the imported file might not be added to SAS Lineage. Also, future updates to the terms or their attributes will not be reflected in the relationship service. However, the Relationships service can be updated later by running the batch command line program described in Command-Line Processing for Imported Terms.
  4. Navigate to the folder that contains the XML file to be imported.
  5. Select the XML file. The file that you select must have an .xml extension and a name that is encoded in UTF-8.
  6. 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.

Exporting 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.
  5. Click Save in the Export Terms window, 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 has the structure that is described in the Overview of this topic. 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 SAS MDM. The same method can also be used to perform the following tasks:
  • Select a set of terms to create
  • Create SAS MDM 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.
Last updated: June 7, 2017