Saturday 18 January 2014

TALEND: Creating Context variables from Metadata





Step 1:

From the “Repository” panel right click on the “DB Connections”.  Select “Create connection” from the pop-up men
In the pop-up window (“Database Connection”) that appears next set a name for your connection and click on the “next  >” button.   The screen shown in step 2: should appear.  


Step 2:

Follow the sub-steps ‘I’-‘IV’ which reference the screenshot below.
I.)    Select from the “DB Type” drop down the source database type.  In the case of this example “MySQL” is selected.
II.)    Fill in the connection criteria i.e. “Login”, “Password” and “Database”
III.)    Once the connection criteria has been entered click on the “Check” button to make sure that Talend can connect to the database.  If the check fails then re-visit the connection criteria entered.
IV.)   Once the connection has been verified click on the “Finish” button.   


Step 3:

Find your newly added Metadata connection object under “Metadata” from the Repository Panel and right click on your connection object (below in the screenshot “MySQL_test_connection” is selected ) and click on “Retrieve Schema” .  

Step 4:

From the pop-up that appears after clicking on “retrieve schema” click on the “Next  >” button,  which will bring you to the screen shown below.  Under your connection database select the tables that you will need to access.  Below I have select "city", "country" and "countrylanguage" from the "world" table.  




Once your selections are made click on “Next  >”.


Step 5:

In the next window you will need to select each table from the right hand and click on the “Retrieve Scheme” button for each.  Once this is done click on “Finish”

 

Step 6:

Find your newly added Metadata connection object under “Metadata” from the Repository Panel and right click on your connection object and select “Edit Connection” from the right-click menu.
On the first “Database Connection” window that appears click on “Next  >”. In the window that appears next click on the “Export as context” button as shown below


In the pop-up window that appears (“Create/Edit a context Group” as shown below) click on the “Finish” button which will create an initial connections context group.  The screenshot below shows  Step 2 of 2 which is shown after the "Next >" button is clicked. 


After you click on the “Finish” button you will be returned to the “Database Connection” window.  
Click the “Finish” button from the “Database Connection” window.  You will be prompted to update all current jobs to use the context metadata.  Selecting "Yes" will update all jobs that use the metadata to use the context based connection.

After this step a context group should have been created under the “Contexts” menu in the “Repository” Panel with the same name as your Metadata connection.