Extracts from multiple tables
The previous extract example was based on data from a single table, but we frequently need to retrieve data from multiple tables in a denormalized form. Most modern applications that use a relational database will have a normalized structure, so, by definition, extracting data in a denormalized form will involve joining data from different tables.
In the Studio, we can join the data within the database extract component, using the database itself to do the work or outside of a component, within the job, where it is Java that does the data crunching. Let's take a look at examples of both.
Joining within the database component
Our first example is straightforward and presents an SQL query to the database component that joins two database tables. Carry out the following steps to recreate this job:
Create a new job in the repository and call it
DBInternalJoin
.In the Repository window, expand the Metadata section, click on the DEMO_DB connection (highlighted in red...