The XML Import tool is a command line wrapper of the XML Import that you find in the swArchitect and swExplorer clients. Depending on your needs, it can be suitable to import meta model and/or metadata in the form of an XML file. The tool is 64-bit. As this tool is not part of our standard delivery, to obtain it, contact support@systemweaver.com.
Note: It is not possible to import XMI. For importing Requirements Interchange Format files, see Importing ReqIF files. |
Prerequisites
- Server, port and login information for the database to which you want to import.
- An installation of the swXMLImport tool including all necessary dll files.
- For very large data imports, ensure that the machine on which you are running the command has sufficient RAM, e.g., min. of 16 GB.
Installing the Tool
Save the swXmlImport directory to a suitable location on your local drive. The directory should contain the following files:
Creating the Command Line
Below are two example command lines to illustrate how to include parameters:
Example
Simple import using Username and Password, and all of the default settings:
Optional and Mandatory Parameters
Below are all available parameters for command line XML Import:
Parameter | Definition | Expected value type | Example |
ServerPort | Required. The port of SystemWeaver server | Integer | ServerPort=1768 |
ServerName | Required. The name or IP address of SystemWeaver server | String | ServerName=localhost |
ServerUserName | The SystemWeaver username to connect with. If not supplied, network authentication will be used. | String | ServerUserName=user |
ServerPassword | The SystemWeaver password to connect with. If not supplied, network authentication will be used. | String | ServerPassword=pass |
XmlFileName | Required. The data file to import. | String | XmlFileName=D:\test.xml |
LibraryId | Required. The xId for the import library | SystemWeaver xID | LibraryId=x0000000313533522 |
ImportVersionInfo | Optional, Default=true. Whether to include the items' version numbers from the import file. In the UI, the corresponding option is called "Import version numbers". | Boolean | ImportVersionInfo=false |
MatchOnAncestorId | Optional, Default=false. Whether to match on AncestorID in case there is no match on object ID. This means that the version history of the imported objects will be according to the order of import rather than replicating the version history of a source database. In the UI, the corresponding option is called "Fallback to match on ancestor". | Boolean | MatchOnAncestorId=true |
MatchOnForeignId | Optional, Default=false. Whether to match the imported IDs with the Foreign IDs properties of the objects in the database. In the UI, the corresponding option is called "Match on foreign id". | Boolean | MatchOnForeignId=true |
ForeignIdNamespace | Optional. Note: Do not use ForeignIdNamespace and Export Import Prefix in a data exchange setup. | String | ForeignIdNamespace=DB1_QA |
ImportOwner | Optional, Default=false. Specifies if the Owner property of imported items - if included in the SystemWeaver XML file - should be imported as an attribute. | Boolean | ImportOwner="true" |
OwnerAttributeSID | Optional. Specifies the attribute SID where the Owner property should be stored. | String | OwnerAttributeSID=SID7 |
IncludedParts | Optional. Lists the SIDs of part types to be included in the import. Part types not listed will be excluded from the import and type checking. | String | IncludedParts=SID1;SID2;SID3 |
IncludedAttributes | Optional. Lists the SIDs of attribute types to be included in the import. Attributes that are not listed will be excluded from the import and type checking. | String | IncludedParts=SID4;SID5;SID6 |
Things to Consider
- If you are importing a very large amount of data, your import could effect performance for other system users. Keep this in mind when scheduling your import.
Example of a Completed import Command
To use the tool, run your command line from the location of the executable and related files.