Deleting Profile records in Lotus Connections (and yet another reason to love TDI)

On rare occasions I am asked to delete a users Profile completely from Lotus Connections, whenever this happens my first stop is over at Marco Ensing’s blog where is he is always kind enough to remind me how to format the input file to run the “delete_employee_records” assembly line (which is found in the profiles_tdi.xml file that ships with Lotus Connections) .  The format of the file is like this

$dn:CN=Willis Jackson,OU=TV,o=the80s uid:Willis Jackson . $dn:CN=Arnold Jackson,OU=TV,o=the80s uid:Arnold Jackson

This is not something I do very often, and it has always been for one or maybe two users so manually creating the import file has never been an issue, yesterday however was a little different there were 100+ records that had to be removed from Profiles (long story for another day).  The first step was to gather up the required information, as seen above it is the UID, and the Distinguished Name for each user to be deleted.  These attributes are both obviously in the Domino Address Book, but they are also in the Lotus Connections Profiles database in the EMPLOYEE Table.  The UID is stored in the PROF_UID column, and the Distinguished Name is in the PROF_SOURCE_UID field.   Since I was able to identify each person to be deleted I ran a query against the DB and exported the results as a CSV file which looks like this (note I made the separator a semi-colon not a comma since the DN contains a comma)

Willis Jackson;CN=Willis Jackson,OU=TV,o=the80s Arnold Jackson,CN=Arnold Jackson;OU=TV,o=the80s

So now the challenge is getting this data in to the right format for the “delete_employee_records” assembly line, I knew I was not spending the time to change it in to the correct format, and that is when it hit me, why bother, instead of simply changed the TDI script to read the file I had.  Lets take a look. Here is the assembly line in TDI A picture named M2 and here is the default parser for reading the input files set to use “ibmdi.simple” original parser If we connect to the file and read it in TDI it looks like this iterate-entries(default) So the next step is to change the parser from “ibmdi.simple” to “ibmdi:CSV” so that we can read input from a CSV formatted file, the other step is to set the Field Separator (again remembering I used a semi-colon not a comma as to not break up the distinguished names), and add in the field names which are simply the same as they were in the Default Format (UID, and $dn) so it looks like this revised parser When we connect to the file and read it in TDI, it looks suspiciously the same as it did above as seen here iterate-entries(revised) Once I changed the parser to read the file in the format the way I had it, which took about two minutes I was able to run the assembly line and process the deleted records, much simpler then formatting 100+ records into the originally expected format. Yet another way you can use TDI to make your life easier. Additional Information Lotus Connections InfoCenter Deleting users from the Profiles database Tivoli Directory Integrator: Part 4: Concepts & Vocabulary (by Marie Scott and Duffbert) IBM Tivoli Directory Integrator Users Group

3 Responses to Deleting Profile records in Lotus Connections (and yet another reason to love TDI)
  1. Scott Petricig
    November 4, 2009 | 12:41 pm

    I haven’t had the pleasure of using Connections yet (besides the Greenhouse) but it seems like it’s overly complicated to delete profiles… very surprised they don’t have an easier way to do this for admins..

  2. Sjaak Ursinus
    November 6, 2009 | 5:24 am

    Mitch as we have discussed with each other. An other way of reaching the goal of only having a selective group of users out of your central cooperate LDAP.

    @Scott … This can be maybe the solution for you as this is much less complex as what Mitch has written about but in mitch’s case their cooperate policy is not to delete user profiles at all. Even if they have left the company ! So becose of that mitch couldn’t use the user selection functionality of the TDI script’s

  3. Karl Karriere
    November 10, 2009 | 4:14 am

    thank you, mitch, for this useful tip.