® IBM Tivoli Directory Integrator Tivoli Directory Integrator Exercise 2 – Mapping to...
-
Upload
bethany-estella-willis -
Category
Documents
-
view
236 -
download
14
Transcript of ® IBM Tivoli Directory Integrator Tivoli Directory Integrator Exercise 2 – Mapping to...
®
IBM Tivoli Directory Integrator
Tivoli Directory IntegratorTivoli Directory Integrator
Exercise 2 – Mapping to inetOrgPersonExercise 2 – Mapping to inetOrgPerson
Eddie HartmanEddie [email protected]@no.ibm.com
2005.04.122005.04.12
®
IBM Tivoli Directory Integrator
2
Exercise 01: CSV to XMLExercise 01: CSV to XML
CSVFile
XMLDocument
FileSystem Connector
w/ CSV Parser
FileSystem Connector
w/ XML Parser
1. Create AL (CSVtoXML)
2. Add Connector to read CSV(configure, discover & map)
NOTE: Semi-colon separator (;)
3. Add Connector to write XML
4. Run AL and view results
IBM Tivoli Directory Integrator
3
Kernel/component architectureKernel/component architecture
CSVFile
XMLDocument
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.
The kernel provides common, generic functionality for all Connectors. Thisis where all customization is carriedout (like Attribute Maps and scripting).This is the AssemblyLine Connector.
IBM Tivoli Directory Integrator
4
The Entry objectThe Entry object
CSVFile
XMLDocument
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 isaccessed via thepre-registeredscript variablecalled "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_avalue_b
Attribute_2
value_c
Attribute_n
...
Flat Schema:
Entries can hold Attributes.
Attributes can have values.
IBM Tivoli Directory Integrator
5
AL LifecycleAL Lifecycle - Phase One: Initialization - Phase One: Initialization
CSVFile
XMLDocumentAll Connectors bind to their data
sources.
XMLDocument
CSVFile
IBM Tivoli Directory Integrator
6
AL LifecycleAL Lifecycle - Phase Two: Cycling (Read) - Phase Two: Cycling (Read)
CSVFile
XMLDocument
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.
IBM Tivoli Directory Integrator
7
AL LifecycleAL Lifecycle - Phase Two: Cycling (Input Map) - Phase Two: Cycling (Input Map)
CSVFile
XMLDocument
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.
IBM Tivoli Directory Integrator
8
AL LifecycleAL Lifecycle - Phase Two: Cycling (Output Map) - Phase Two: Cycling (Output Map)
CSVFile
XMLDocument
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.
IBM Tivoli Directory Integrator
9
AL LifecycleAL Lifecycle - Phase Two: Cycling (Write) - Phase Two: Cycling (Write)
CSVFile
XMLDocument
The output Connector performs the write operation using the Attributes in its Conn Entry.
IBM Tivoli Directory Integrator
10
AL LifecycleAL Lifecycle - Phase Two: Cycling (Repeat...) - Phase Two: Cycling (Repeat...)
CSVFile
XMLDocument
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.
IBM Tivoli Directory Integrator
11
AL LifecycleAL Lifecycle - Phase Three: Shutdown - Phase Three: Shutdown
CSVFile
XMLDocument
When the cycle phase stops, the Connectors close their connections.
IBM Tivoli Directory Integrator
12
Exercise 01: CSV to XMLExercise 01: CSV to XML
CSVFile
XMLDocument
AddressCity
DepartmentStatus
FirstNameLastName
StateTitle
EmployeeNumberZip
AddressCityDepartmentStatusFirstNameLastNameStateTitleEmployeeNumberZip
Simple mapping
IBM Tivoli Directory Integrator
13
Exercise 02: CSV to XML (inetOrgPerson)Exercise 02: CSV to XML (inetOrgPerson)
CSVFile
XMLDocument
AddressCity
DepartmentStatus
FirstNameLastName
StateTitle
EmployeeNumberZip
streetlouemployeeTypegivenNamesnsttitleuidpostalCodecnmailobjectClassdn
Advanced mapping
Simple mapping
IBM Tivoli Directory Integrator
14
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>
IBM Tivoli Directory Integrator
15
Exercise 02: CSV to XML (Advanced map)Exercise 02: CSV to XML (Advanced map)
cn
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";