02MappingtoinetOrgPe rson

50 %
50 %
Information about 02MappingtoinetOrgPe rson
Education

Published on February 7, 2008

Author: Tito1

Source: authorstream.com

Tivoli Directory Integrator:  Tivoli Directory Integrator Exercise 2 – Mapping to inetOrgPerson Eddie Hartman eddie.hartman@no.ibm.com 2005.04.12 Exercise 01: CSV to XML:  Exercise 01: CSV to XML CSV File XML Document FileSystem Connector w/ CSV Parser FileSystem Connector w/ XML Parser Create AL (CSVtoXML) Add Connector to read CSV (configure, discover & map) NOTE: Semi-colon separator (;) Add Connector to write XML Run AL and view results Kernel/component architecture:  Kernel/component architecture CSV File XML Document The Entry object:  The Entry object CSV File XML Document The Entry object is the data carrier in an AssemblyLine. The primary Entry is the Work Entry which is used to move data down the flow. This object is accessed via the pre-registered script variable called "work". 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" . Attribute_1 value_a value_b Attribute_2 value_c Attribute_n ... Flat Schema: Entries can hold Attributes. Attributes can have values. AL Lifecycle - Phase One: Initialization:  AL Lifecycle - Phase One: Initialization All Connectors bind to their data sources. AL Lifecycle - Phase Two: Cycling (Read):  AL Lifecycle - Phase Two: Cycling (Read) CSV File XML Document AL automation powers the first Connector to read from the input file, passing the byte stream through the CSV Parser. 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. AL Lifecycle - Phase Two: Cycling (Input Map):  AL Lifecycle - Phase Two: Cycling (Input Map) CSV File XML Document The Input Map of our first Connector specifies which Attributes are to be created in the Work Entry. 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. AL Lifecycle - Phase Two: Cycling (Output Map):  AL Lifecycle - Phase Two: Cycling (Output Map) CSV File XML Document The Work Entry is passed to our output Connector, where the Attributes to write are specified in its Output Map. Attribute values are now copied/computed the opposite direction: from the Work Entry to the Conn Entry. AL Lifecycle - Phase Two: Cycling (Write):  AL Lifecycle - Phase Two: Cycling (Write) CSV File XML Document The output Connector performs the write operation using the Attributes in its Conn Entry. AL Lifecycle - Phase Two: Cycling (Repeat...):  AL Lifecycle - Phase Two: Cycling (Repeat...) CSV File XML Document When the end of the AssemblyLine is reached, AL automation empties the Work Entry and passes control back to the start again. Cycling repeats as long as there is data to process, or until the AL is terminated by command or aborts due to unhandled errors. AL Lifecycle - Phase Three: Shutdown:  AL Lifecycle - Phase Three: Shutdown CSV File XML Document When the cycle phase stops, the Connectors close their connections. Exercise 01: CSV to XML:  Exercise 01: CSV to XML Address City Department Status FirstName LastName State Title EmployeeNumber Zip Address City Department Status FirstName LastName State Title EmployeeNumber Zip Exercise 02: CSV to XML (inetOrgPerson):  Exercise 02: CSV to XML (inetOrgPerson) Address City Department Status FirstName LastName State Title EmployeeNumber Zip street l ou employeeType givenName sn st title uid postalCode cn mail objectClass dn Exercise 02: CSV to XML (Computed values):  Exercise 02: CSV to XML (Computed values) cn FirstName + " " + LastName mail cn (minus ".", replace " " with ".") + <domain> objectClass inetOrgPerson dn "uid=" + uid + <suffix> Exercise 02: CSV to XML (Advanced map):  Exercise 02: CSV to XML (Advanced map) cn mail objectClass dn ret.value = conn.getString("FirstName") + " " + conn.getString("LastName"); var mVal = system.trim(conn.getString("cn")); mVal = system.remove(".", mVal); ret.value = mVal.replace(' ', '.') + "@ewidgets.com"; ret.value = ["top","person","organizationalPerson", ”inetOrgPerson”]; ret.value = "uid=" + conn.getString("uid") + ",ou=employees,o=ewidgets,dc=com";

Add a comment

Related presentations