You are here: Chapter 9: Advanced Features > BMC Configuration Manager (with Service Catalog) > CMDB Homepage > Import from Text (CSV) File

Import from Text (CSV) File

Any data that can be saved to a CSV file can be imported using an import ruleset. This is useful for data saved in spreadsheets or any data that can be saved in CSV format, for example output of some barcode scanners or data from other applications . The ordering of the columns can be flexible as the import will assist you in specifying what data you want and don’t want and how that data should be mapped. You must create or import CIs before importing relationships; the CIs to relate have to already exist in the CMDB.

 

Import CIs

To import CI data from a text file that is in .CSV format:

  1. From the CMDB homepage, select Admin | Imports. The CMDB Import Data page is displayed.
  2. Click the New button. The Data Import | Add New Ruleset page is displayed.
  3. From the Data Source Type drop-down field, choose Text File (csv). The page is expanded to display fields for defining the import.
  4. Complete the fields as follows:

Import Relationships

This procedure describes importing relationship data from a CSV file. Some CIs must already exist in the CMDB in order to import relationships between them. The CSV file must contain a minimum of 2 columns that will uniquely identify the 2 CIs being related. Additionally, a column could exist that identifies the type of relationship if 1 ruleset will contain multiple relationship types. Additional columns that help uniquely identify the CIs could also be included if a combination of data from 2 or more columns is needed to uniquely identify the CI.

  1. From the CMDB homepage, select Admin | Imports. The CMDB Import Data page is displayed.
  2. Click the New button. The Data Import | Add New Ruleset page is displayed.
  3. From the Data Source Type drop-down field, choose Text File (csv). The page is expanded to display fields for defining the import.
  4. Complete the fields as follows:

If two or more columns of data are needed to uniquely identify the From CI, you can add additional identifiers. Only CIs that match all From identifiers will be selected when the import runs.

When you have made your selections, click the Complete button. The mapping is displayed in the From CI Identifier field.

  1. To CI Identifier—This field is used to define which column(s) in the file corresponds to which CI attribute in the CMDB. Using our example above, the second column containing the Names of the Printers might be called "Printers", which could correspond to the attribute "Printer Name" in the CMDB. At least one mapping must be defined. To perform the mapping, click the Add button. The Select Identifier fields are displayed.
  2. Column—Select the name of the column that contains data that will uniquely identify a CI that exists in the CMDB for the To relationship from the drop-down field.
  3. Attribute—Select the name of the attribute that contains data that will match the data being imported from the column for the To relationship from the drop-down field.

If two or more columns of data are needed to uniquely identify the To CI, you can add additional identifiers. Only CIs that match all To identifiers will be selected when the import runs.

When you have made your selections, click the Complete button. The mapping is displayed in the To CI Identifier field.

  1. When you have completed the fields on this page, click the Next button. The General Options step is displayed.
  1. The General Options step has fields which may be completed as follows:
  2. Save As—Enter a name for this ruleset. Saving the rule is required in order to rerun the rule, either on a schedule or manually. If you save the ruleset, it will be displayed in a list the next time you select Admin | Imports from the CMDB homepage. At that point, you will also be able to edit the ruleset as well.
  3. Notes—Enter any commentary you wish in this field.
  4. Schedule—Define a schedule for running the import. The import will run automatically on the schedule you set here.
  5. Immediately—The import is scheduled to run as soon as you click the Finish button and will start running within 1 minute.
  6. Specific Time/Date—When you click this radio button, a field is displayed for selecting the time and date at which to run the import. Click anywhere in the field or on the icon to display the time and date scheduler. This is a one-time import.
  7. Recurring—Select Recurring to set up an automatic, recurring import of data. When you click this radio button, a Configure button is displayed. Click the Configure button to display the scheduler. Set the recurring import to occur Daily, Weekly, or Monthly, then set the day of the week or month and the time of day on which to perform the import. This option is not available for an uploaded CSV file.
  8. Manual Only—Select Manual Only to perform imports only when the system is instructed to do so from the Admin | Imports page by clicking the Run button.
  9. Email Summary—The email summary sends a summary when the import is finished. The summary contains some basic information about the import, such as how many CIs were created and/or updated, as well as error messages received. Enter the email addresses or agent user IDs of those you want to receive an email summary.
  10. Pop-up Summary—The pop-up summary displays the same information as the email summary, only as a pop-up window. The window is displayed either immediately to agents who are logged in or the first time an agent logs in after the import is performed. Enter the agent user IDs of those you want to receive a summary pop-up.
  11. Enter your password and click the Finish button. The CMDB Data Import page is displayed with the new ruleset listed in the Ruleset column.