Mapping target attributes to source columns
Mapping target attributes to source columns defines how data in the source corresponds to data in BMC Atrium CMDB and which actions to take when transferring between them. A source key uniquely identifies a row of data. You must specify the attributes of the CI class and the corresponding column in the external data store that together make up the source key. After a data transfer, the source key is the link that matches a record in the external data store with its counterpart in BMC Atrium CMDB.
When choosing an attribute as a source key, consider the following points:
- Do not use an attribute whose value could change or could be NULL, such as the
Descriptionattribute. If the source key of a record is NULL, the record cannot be identified and it cannot be transferred.
If your external database has records with empty values, you can create a view of your external database to filter out such records. You can then map target attributes to source columns based on this view.
- Select a unique attribute that you can also use for identification during reconciliation. You can select attributes to use for the source key that are already in the standard identification rule. This ensures that you can use a Standard Job for reconciliation. For more information about Standard Jobs, see Creating a standard reconciliation job.
- If you cannot use the standard rules, use attributes inherited from the
BMC_BaseElementclass. This simplifies your reconciliation setup by allowing multiple classes to inherit identification rules from the
BMC_BaseElementclass. For the sample scenario shown in Organization of the computer and disk drive database tables, you would define a source key that relates a drive ID in the Disk drive ID column of the CalbroDiskDrive table with the
CalbroIntegrationIDattribute in the
- If you select more than one key in CMDBOutput and CMDBLookUp plug-in then make sure that the data in source does not contain comma or update will not happen correctly.
To map target attributes to source columns for CSV or XML files
- In the Mapping page, select the CSV or XML file from which you want to transfer records.
- For CSV, columns from the selected file are displayed in the Source Columns list.
For XML, columns from the selected file are displayed in the Source Columns list after you select File > Xpath. The Xpath field lists all the parent nodes available in an XML file. When you select a parent node, respective child nodes are displayed in the Source Columns list.
For XML, duplicate attributes will be renamed with an underscore and copy number( attribute name1, _attribute name_2 and so on)
Mapping page of the Integration Job Builder wizard for XML files
Select a target attribute to which you want to transfer data. To filter attributes by name, type in the Target Attributes field. Filtering is case insensitive and displays all results containing the filter text.
You must map all attributes identified by a * preceding the attribute name (for example, *Name).
- From the Source Columns table, select a column from which you want to transfer data to the selected attribute.
To map the selected attribute to a constant value, enter the value in the field below the Source Columns table. To filter columns by name, type in the Source Columns field. Filtering is case insensitive and displays all results containing the filter text.
Click Map. The selected attribute and source column move to the Mapped Columns table.
By default, the type for all mapped fields that are listed in the XML or CSV step input is set to String. Based on your requirements, you can manually change the type for specific fields. When you change type to date, the date format must be the same format used in the CSV or XML file. For more information, see Changing the field type in the XML or CSV step input in Atrium Integrator Spoon.
- Repeat step 2 through step 4 for each attribute to which you want to transfer data.
- In the Mapped Columns table, select the Source Key check box for the Target Attribute/Source Column row that you want to specify as a source key.
Repeat step 6 for each source key that you want to map.
When you have a source key with more than one attribute from each side, the expressions are joined with an AND operator. That means a data row in the external data store matches an instance in BMC Atrium CMDB only if each pair of attributes in the source key matches.
You must have at least one attribute/source column mapping in addition to those specified as source keys.
- Click the Transformation Options tab.
Transformation Options tab-Integration Job Builder wizard
- In the Delta area:
- Select No to retrieve all source records each time your job runs.
Select Yes to import only new or updated source records since the last transfer was run. Then select the column in your source that holds the time stamp indicating when each record was last modified. During each data transfer, the only records retrieved from the source are new records and those with a last modified time stamp that is later than the most recent successful transfer.
The default value for Delta is Yes if a column in your source table has a Date/Time value. If the source is a CSV file, all columns are listed in the Delta area.
For XML delta and CSV delta, by default, the type for all mapped fields that are listed in the source step ( Get Data from XML step for XML and Text file input step for CSV) and are set to String. When you select a field for the Delta option, you must manually change the type for that field to Date. For more information, see Changing the field type in the XML or CSV step input in Atrium Integrator Spoon.
BMC recommends that you select the Delta=Yes mode when you first create the job so that the job can be run in both delta and full modes in the future. If you specify Delta=No (that is, select full mode), the transformation that is designed will require significant manual changes in BMC Atrium Integrator Spoon to make it delta enabled.
- Specify whether you want to set a Response field. You can specify a field that is updated in the source record after a record is created or updated in the target. Only integer and character type values are supported in the Response field.
- To modify the response value, edit the UpdateResponse step.
- If you select Yes, select the column in your source that you want to update.
Typically, you use a Response field when a value is generated at the time a target record is created or modified and you want that value stored in the source record. For example, you might need to store the ID number of the target record just created, or you might want to update a time stamp in the source data, indicating the time that a transfer took place.
- In the Delete area:
- (default) Select No to retain a record in BMC Atrium CMDB when that record is deleted from the source data store.
Select Yes to delete a record from BMC Atrium CMDB when that record is deleted from the source data source. This option sets the MarkAsDelete field to Yes for the records that are deleted from the source data store.
When you select Yes, a separate Delete transformation is created as part of the job. The Delete transformation is triggered immediately after the transformation that transfers the corresponding data to BMC Atrium CMDB is complete.
The Delete option is also not available for relationship classes.
- Click Next. The Mapping page for the next CI type appears. For example, if you had selected
Disk driveto be transferred to BMC Atrium CMDB, the Disk drive Mapping page appears. If you selected only one CI, the Schedule page appears.
To map target attributes to source columns for database tables or views
- In the Mapping page, specify whether your source data is in a table or a view. The columns from the source table are displayed in the Source Column Name list box.
Mapping page of the Integration Job Builder wizard for database tables
- Select the Schema and Table name for the source data.
- Follow step 2 to step 12 to map target attributes to source columns.