Deleting Profile records in Lotus Connections (and yet another reason to love TDI)
Tags: 
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
and here is the default parser for reading the input files set to use "ibmdi.simple"
If we connect to the file and read it in TDI it looks like this
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
When we connect to the file and read it in TDI, it looks suspiciously the same as it did above as seen here
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




-

Comments
Posted by Scott Petricig @ 12:41:16 PM on 11/04/2009 | - Website - |
@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
Posted by Sjaak Ursinus @ 05:24:41 AM on 11/06/2009 | - Website - |
Posted by Karl Karriere @ 04:14:57 AM on 11/10/2009 | - Website - |