Article

coolguys's picture

Extracting Multi-Valued IDM User Data to .CSV Format

article
Reads:

1895

Score:
0
0
 
Comments:

0

Problem

A Forum reader recently asked:

"I need to provide a regular extract of user data from our eDirectory in .csv format. The data required is a few attributes, one of which - Description - is multi-valued. I have tried using ICE, but when it outputs to .csv it only outputs the first value of a muli-valued attribute. I thought a better way might be to create a delmited text driver to export the user attributes.

I have two questions: 1) How do I schedule the extract to be taken once a day, so I can write a little batch job to automatically send the csv file once it has been created?
2) How can I get the driver to output all values in a
multi-valued attribute?"

And here's the response from Father Ramon ...

Solution

You could schedule this once a day using a trigger job (IDM 3.5). You'd have to add a policy in the event transformation to handle the trigger and initiate the sync of the objects you want. If you don't have IDM 3.5, you would probably need to use some external program (like dxcmd) to trigger the sync and schedule via cron or Windows Scheduler.

To output as many fields as there are values, you could do something like this:

<pre class="code"><xsl:for-each select="*[(@attr-name = 'dealerrole')]/value">
  <xsl:value-of select="$space"/>
  <xsl:call-template name="output-field">
   <xsl:with-param name="field-value" select="."/>
  </xsl:call-template>
</xsl:for-each>





User Comments

© 2009 Novell, Inc. All Rights Reserved.