Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Querying for Duplicate Usernames

  1. #1
    Join Date
    Mar 2016
    Posts
    2

    Default Querying for Duplicate Usernames

    Hi everyone, I've been struggling with this particular issue for a few weeks (on/off) and I'm at my wits end.

    I am pulling user data from an Oracle database, transforming the various fields and am going to populate Active Directory.

    The issue I am having is with checking for duplicate usernames. I cannot find a way to check my generated username against any LDAP source. Everything I've tried ends up doing a JOIN (stream lookups, etc), which drops out records that I want. It's certainly possible I'm doing something incorrectly, but I've tried just about everything.

    In short, I want to check the generated usernames against existing records in AD/LDAP and then proceed to add a '1' to the username, check AD, add '2', check AD, etc.

    My kettle file is attached (though I removed any connection passwords), and I'm using PDI 6.0.0.0

    Thanks in advance!
    --Ben
    Attached Files Attached Files

  2. #2
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    When provisioning user accounts with Kettle, I don't test for collisions, I just prevent them.
    From the user store (AD) I gather the existing accounts and split the userid (sAMAccountName) to get the username and the collision counter.
    Using Group-By I build a dictionary that returns the highest counter for each username.
    By joining existing accounts to employees (students) by employeeNumber I learn about new users - they are those whose employeeNumber isn't associated with an existing account.
    Now I generate usernames and use Add-Value-Fields-Changing-Sequence to generate a preliminary collision counter starting from 1, which I later increase by the previously found highest counter before I attach the final collision counter to the generated username.
    So long, and thanks for all the fish.

  3. #3
    Join Date
    Mar 2016
    Posts
    2

    Default

    Thank you!
    There's always another way to approach the same problem. I'll give this a try and see where I end up.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.