Rather than modify and potentially mess up your running AssemblyLine, we will make a copy of it and then change the copy instead. Do this by right-clicking on the 'CSV2XML.assemblyline' and selecting Copy.
AssemblyLine Copy function
Now right-click on the 'AssemblyLines' folder in the Navigator and select the Paste option. Call this new AssemblyLine 'CSV2XML_LookupMode' and then double-click on it to open the AssemblyLine editor.
We can now remove the ConnectorLoop along with all components under it. Just select it and press the Delete key. In its place we will be dragging in a JDBC Connector that we will copy from another AssemblyLine.
But first build the database table that this Connector will be reading from; or rather, run a pre-built AssemblyLine to build it for you. To do this, use a file browser to navigate to the 'Tutorials' folder and locate the file called CreatePhoneDB.assemblyline. Drag it into the CE window on top of the 'AssemblyLines' folder in the Navigator panel.
Copying an AssemblyLine into our project
The AssemblyLine will be imported into our project. Now right-click on it and choose Run AssemblyLine...
Run the CreatePhoneDB AssemblyLine
This AssemblyLine will first create a Derby1 database under your solution directory called 'TutorialDB' and then set up a 'PhoneDB' table. It will then loop through PhoneNumbers.xml and load this information into the new table2.
If all goes well then the log output should look like this:
Log output from the 'CreatePhoneDB' AssemblyLine
The 'CreatePhoneDB' AssemblyLine has a JDBC Connector that is already configured and ready to use. You are going to copy this component to our Project Resource library (specifically, to the "Connectors" folder) and then reuse it in your AssemblyLine.
Open up the 'CreatePhoneDB' AssemblyLine, grab the Connector called 'PhoneDB' and drag it to the 'Connectors' folder located under 'Resources' in the Navigator tree.
Drag a Connector to Resources
Close 'CreatePhoneDB' so that our own AssemblyLine is visible again. Then drag the new 'PhoneDB.connector' resource into the spot previously occupied by the ConnectorLoop.
Drag the new resource into our AssemblyLine
Parent topic: Introducing IBM TDI
1 Derby is an open-source relational database, bundled with Tivoli Directory Integrator.
2 Although the AssemblyLine will not
be covered in this guide, it is a good example of advanced scripting
techniques used to exploit the data source-specific functionality
found in most Connector Interfaces. Feel free to examine and play
with this AssemblyLine.