Monday, June 29, 2009

Delta Processing Order for custom LDIF

Just a reminder when you are building your own custom Delta processing rig for your XMAs and you're using LDIF – the order in which you list the updates in your LDIF file is important. Consider this, you get a MODIFY request for record 10 but you don't have the ADD entry until farther down in the file. What you get is the 'need-full-object' exception during the discovery (Import) phase.

So, when building your own custom delta processing rig, make sure you group the records prior to writing them to the LDIF file like so:

  1. Adds
  2. Deletes
  3. Modifies or Attribute Modifies (for ALCN)

My colleague Jerry Camel had already done this properly in some of our LDIF conversion libraries but this cropped up again when we were generating the LDIF from a table where the deltas had already been calculated for us by the data owners (good data owners!). A quick 'group by' clause in the SQL and you should be good to go! It just so happens that if you're using "ADD", "DELETE", "MODIFY", and "MOD-ATTR" as your delta status values then a straight ORDER BY clause will put them in the correct order since they are already ordered properly alphabetically.

0 comments:

Post a Comment