Data Table Joins work similar to a JOIN clause in relational databases.
There are four Data Table Joins in Sequentum Enterprise
- Inner Join
- Left Join
- Right Join
- Full Join
However, not all of them are supported depending on a type of your Internal Database. For example, SQLite supports Inner Join and Left Join only, while MS SQL Server supports all four of them.
Now, let's look at some data to explain how Data Table Joins work.
We have a table called Suppliers with two fields (supplier_id and supplier_name). It contains the following data:
We have another table called Orders with three fields (order_id, supplier_id, and order_date). It contains the following data:
Let’s create an agent with two Web Element List commands. The first one is called Suppliers that will extract data from Suppliers table, and the second one is called Orders that will extract data from Orders table.
Notice that the supplier_id column in the Suppliers table refers to the supplier_id in the Orders table. The relationship between the two tables above is the supplier_id column.
The Result Data List should have the following configuration:
Data provider: Data Table Join
Data List 1: Suppliers
Key 1: supplier_id
Data List 2: Orders
Key 2: supplier_id
Join Type: Inner Join
Our Result Data List would produce data that look like this:
It is similar to executing the following SQL query
SELECT Suppliers.supplier_id, Suppliers.supplier_name, Orders. order_id, Orders.order_date
INNER JOIN Orders
ON Suppliers.supplier_id = Orders.supplier_id
Currently, it is only possible to join two Web Element Lists or Data Lists at the time. If you need to join more than two, you could do that in multiple steps. For example, join Data List 1 and Data List 2, which will produce Result Data List. Then, join Result Data List and Data List 3, and so on.