Data Connector import rule fails to set a foreign key correctly

Article:TECH192860  |  Created: 2012-07-12  |  Updated: 2014-04-09  |  Article URL http://www.symantec.com/docs/TECH192860
Article Type
Technical Solution


Issue



When using a Data Connector import rule, a foreign key is attempting to be set in the "Data class mappings" section. For example, the Ownership Details > Owner data class, for an Asset Owner. When the Import Rule is ran, the Asset Owner is not updated as expected.


Cause



The Update Mode of the data class is set incorrectly.


Solution



Ensure that the Update Mode for the data class is set correctly to enable it to update foreign keys. The Update Mode has three settings:
 

  • Update (default). This should normally be used for any data class that is single rowed. For example, Asset Owner is usually a single rowed data class, but can have multiple ownerships if this has been changed (not default). If this is used with multi rowed data classes, this could result in duplicates or incorrect values.
  • Append. Append adds additional values after the current value for multi rowed data classes. This should not be used for single rowed data classes. For example, Asset Owner is normally a single rowed data class. Setting the Update Mode to Append would attempt to add a second (and so on) Asset Owner. This will result in no changes to the current Asset Owner unless the Asset Owner is set to have multiple ownerships, and then a second (and so on) Asset Owner will then be added. For multiple line items, such as for purchase orders, this should be used. Note: Importing multiple line items for the same resource, such as multiple line items for a specific purchase order, will result in what appears to be errors:

    Row x skipped for data class "Purchase Order Information". Multiple rows of data for the same resource are redundant for single-rowed data class.

    This is normal, and can be ignored. The imported multi-lined purchase order should successfully have all line items brought in via the import rule.
     
  • Replace. This replaces the current value with the new value. This will work similarly to Update and can be used for a single rowed data class, such as Asset Owner.


For example, the following error will occur if a foreign key is attempted to be used without the Update Mode set to Append:

Error: Row x skipped for data class 'Cost Items'. Multiple rows of data for the same resource is not allowed while using Update mode on a data class without key columns.
Solution: For multi rowed records, the Update Mode usually will need to be changed from Update to Append, to enable multiple updates to occur correctly.

Related Articles

Import Rule fails to set or removes Asset Owner or Cost Center
http://www.symantec.com/business/support/index?page=content&id=TECH170991

Data Connector Import Rule overwrites imported associations or reverse associations
http://www.symantec.com/business/support/index?page=content&id=TECH202757

Data Connector Import Rule overwrites old Cost Items with the new ones, or, re-adds the same Cost Items over and over
http://www.symantec.com/business/support/index?page=content&id=TECH199686

Error "Row x skipped for data class '<data class name>'. Data class foreign key lookup on column '<column name>' failed." occurs when using a Data Connector import rule that has a foreign key data class mapping
http://www.symantec.com/business/support/index?page=content&id=TECH164571

Error "Row x skipped for data class 'Identity'." occurs when using a Data Connector import rule to bring in resources with purchase order cost items
http://www.symantec.com/business/support/index?page=content&id=TECH166546

Error "Row x skipped from data class 'Cost Items'." occurs when using a Data Connector import rule to bring in resources with purchase order cost items
http://www.symantec.com/business/support/index?page=content&id=TECH166544

Data Connector Import Rule fails to create association mappings
http://www.symantec.com/business/support/index?page=content&id=TECH191367

How to troubleshoot import issues when using a Data Connector Import Rule
http://www.symantec.com/business/support/index?page=content&id=TECH195835




Article URL http://www.symantec.com/docs/TECH192860


Terms of use for this information are found in Legal Notices