IBM Tivoli Directory Integrator ® Tivoli Directory Integrator Exercise 2 – Mapping to inetOrgPerson Eddie Hartman [email protected] 2005.04.12 IBM Tivoli Directory Integrator Exercise 01: CSV to XML 1. 2. Create AL (CSVtoXML) Add Connector to read CSV (configure, discover & map) XML Document NOTE: Semi-colon separator (;) FileSystem Connector FileSystem Connector w/ CSV Parser w/ XML Parser CSV File 3. Add Connector to write XML 4. Run AL and view results 2 IBM Tivoli Directory Integrator Kernel/component architecture The kernel provides common, generic functionality for all Connectors. This is where all customization is carried out (like Attribute Maps and scripting). This is the AssemblyLine Connector. CSV File XML Document Each Connector has its own Connector Interface that is built to handle a specific protocol, API, transport or format. These are interchangeable, making it fast and easy to point your AssemblyLine at different data sources. 3 IBM Tivoli Directory Integrator The Entry object The Entry object is the data carrier in an AssemblyLine. XML Document Attribute_1 value_a value_b The primary Entry is the Work Entry which is used to move data down the flow. Attribute_2 Flat Schema: This object is accessed via the pre-registered script variable called "work". Entries can hold Attributes. Attributes can have values. CSV File value_c ... Attribute_n Each Connector has its own local Java bucket (called its Conn Entry) which is used as a local cache for reads & writes, and which available through the script variable "conn" . 4 IBM Tivoli Directory Integrator AL Lifecycle - Phase One: Initialization All Connectors bind to their data sources. XML Document CSV File 5 IBM Tivoli Directory Integrator AL Lifecycle - Phase Two: Cycling (Read) AL automation powers the first Connector to read from the input file, passing the byte stream through the CSV Parser. CSV File XML Document The CSV Parser turns the byte stream into a series of Attributes, each with a single string value. Attributes are put in the Conn Entry. 6 IBM Tivoli Directory Integrator AL Lifecycle - Phase Two: Cycling (Input Map) The Input Map of our first Connector specifies which Attributes are to be created in the Work Entry. CSV File XML Document The Input Map also specifies how the values of these new Work Entry Attributes are copied or computed based on those stored in the Conn Entry. 7 IBM Tivoli Directory Integrator AL Lifecycle - Phase Two: Cycling (Output Map) The Work Entry is passed to our output Connector, where the Attributes to write are specified in its Output Map. CSV File XML Document Attribute values are now copied/computed the opposite direction: from the Work Entry to the Conn Entry. 8 IBM Tivoli Directory Integrator AL Lifecycle - Phase Two: Cycling (Write) The output Connector performs the write operation using the Attributes in its Conn Entry. XML Document CSV File 9 IBM Tivoli Directory Integrator AL Lifecycle - Phase Two: Cycling (Repeat...) When the end of the AssemblyLine is reached, AL automation empties the Work Entry and passes control back to the start again. CSV File XML Document Cycling repeats as long as there is data to process, or until the AL is terminated by command or aborts due to unhandled errors. 10 IBM Tivoli Directory Integrator AL Lifecycle - Phase Three: Shutdown When the cycle phase stops, the Connectors close their connections. XML Document CSV File 11 IBM Tivoli Directory Integrator Exercise 01: CSV to XML Address City Department Status FirstName LastName State Title EmployeeNumber Zip Simple mapping XML Document Address City Department Status FirstName LastName State Title EmployeeNumber Zip CSV File 12 IBM Tivoli Directory Integrator Exercise 02: CSV to XML (inetOrgPerson) Address City Department Status FirstName LastName State Title EmployeeNumber Zip Simple mapping XML Document CSV File Advanced mapping street l ou employeeType givenName sn st title uid postalCode cn mail objectClass dn 13 IBM Tivoli Directory Integrator Exercise 02: CSV to XML (Computed values) cn FirstName + " " + LastName mail cn (minus ".", replace " " with ".") + <domain> objectClass inetOrgPerson dn "uid=" + uid + <suffix> 14 IBM Tivoli Directory Integrator Exercise 02: CSV to XML (Advanced map) cn ret.value = conn.getString("FirstName") +"" + conn.getString("LastName"); mail var mVal = system.trim(conn.getString("cn")); mVal = system.remove(".", mVal); ret.value = mVal.replace(' ', '.') + "@ewidgets.com"; objectClass ret.value = ["top","person","organizationalPerson", ”inetOrgPerson”]; dn ret.value = "uid=" + conn.getString("uid") + ",ou=employees,o=ewidgets,dc=com"; 15
© Copyright 2026 Paperzz