Importing the table schemas
Once we have the connection set up, it is very easy to grab table metadata from the database for use in our jobs. The following example shows how simple this is.
Getting ready
If you have set up the database correctly, then you should be able to see three tables in the database; customer
, order
, and order_item
.
How to do it…
The steps to be performed are as follows:
Right-click on the
cookbookDB_myCopy
database connection and select Retrieve Schema.This opens up a dialogue that will enable you to define filters. We do not need to filter, so click on Next.
View the list of tables in the cookbookDB database by clicking on >. This dialogue also enables us to filter the tables that we are interested in.
Since we want all the tables, click on Select All. You will see that Talend generates the schemas.
Once all the selected tables have been generated successfully, click on Next.
You can now examine and make changes to each of the schemas by clicking on the table in the left...