How to import data into a custom resource or custom data class using a Connector Solution 6.5 Import Rule


Article ID: 178437


Updated On:


Symantec Products




How do I use Connector Solution 6.5 to import data into a custom data class?


A Connector Solution data source and import rule can be used to import data from an external source, such as from a spreadsheet or a staging database, into custom or out of the box data classes. For example, you might have a list of smart phones in a file that you want to import in as assets. This article describes how to perform these procedures.

Note: The examples in this article assume that you have completed the previous examples from the following related article:

How to use CMDB Solution 6.5 to create a custom data class and associate it with a custom resource type

Part One: Create an Import File

If you will be using an existing import file or staging database instead of creating one, skip to Part Two.

  1. Using a text editor, create a new .CSV file and add the following text to it:

    Name, Serial Number, Megapixel Size
    Smart Phone 1, 123XYZ, 3.2-MP
    Smart Phone 2, 456XYZ, 2.0-MP
    Smart Phone 3, 789XYZ, No built-in camera

  2. Save the file as "C:\connector_import.csv".

Part Two: Create a Data Source

  1. To create a data source, in the Altiris Console, go to Configuration > Solution Settings > Connectors > Data Sources.
  2. Right click on the Data Sources folder and choose New > CSV File Data Source. Note: If you will be using a different import type, select this instead. For example, OleDB Data Source can be used to access a Microsoft Excel file.
  3. Type a value for the Name field. For example, "Smart Phone Data Source".
  4. Click on Allow Imports to enable it.
  5. Click on the Browse button for the Import file.
  6. Find and select the import file to use from Part One. Note: If you will be using a different import file, select this instead.
  7. Click on the Open button.
  8. Click on the Test Data Source button. This should display "Details have been saved. Test successful." If not, double check the import file's data for accuracy. Note: Ensure that unique values are present for any required fields, such as serial number, barcode number, and system number. Also ensure that there are no blank rows. If there are non-unique or blank values present, unexpected results will likely occur.
  9. Click on the Apply button. This displays "Details have been saved."

Part Three: Create an Import Rule

  1. To create an import rule, in the Altiris Console, go to Configuration > Solution Settings > Connectors > Import/Export Rules.
  2. Right click on the Import/Export Rules folder and choose New > Resource Import Export Rule.
  3. Type a value for the Name field. For example, "Smart Phone Import Rule".
  4. Select a value for the Data source field. For example, "Smart Phone Data Source" created in Part Two.
  5. Select "Import" for the Replication direction field.
  6. Select a resource type for the Resource type field. For example, select "Smart Phone".
  7. Click on Column Mappings to expand that section. Column mappings will attempt to automatically match up the data source columns with data classes. For example, if using the Smart Phone examples, "Serial Number" should be matched up with "Serial Number", and "Megapixel Size" should match up with "Camera Specification". If the custom data class does not appear, continue with step 7a, otherwise skip to step 8.

    a. Click on "Select a data class" for the Data Class Mappings field.
    b. Select the custom data class under the resource folder it is saved under. Note: A custom data class must be mapped to the resource type selected in step 6 otherwise it will not be able to be selected. Also, when using the Resource Association Selector, the Search box will only search the currently selected Group. This does not recursively search all available data classes.
    c. Click on tyhe Apply button.
  8. Select "Serial Number" for the Resource Lookup Key.
  9. Select "Name" for the Resource Name.

  10. Click on the Test Rule button. This should display an execution window with results. If the Smart Phone examples are being used, this should show three rows of data processed, and three resources created. Note: If this does not show the expected results, either the import file has non-unique values (the import rule can't match the data up), and/or the column mappings are incorrect, such as the wrong resource lookup key or resource name were used. Click on the View full log link for additional troubleshooting information.

  11. Click on the Close button.
  12. Click on the Apply button. This displays "Details have been saved."
  13. Click on the Run Now button. The same results as step 10 should be shown.
  14. Click on the Close button.

Assuming that all the examples were followed, to see the new imported data, go to Resources > Resources > Configuration Items > Asset Types > User Defined > Smart Phones. The three new imported Smart Phone resources should appear in the list.


For more information on how to using Connector Solution data sources and import rules, please refer to the Connector Solution Product Guide, starting on page 18:

CMDB Solution 6.5 Product Guide

For additional related procedures, please refer to the following article:

How to create a CMDB Solution 6.5 custom report that uses a custom data class