The following single-Snap Pipeline runs an SQL query
containing a JOIN command to collate data between two PostgreSQL tables.
Download this pipeline.
- Consider the following tables in a PostgreSQL DB
Note: Notice that the column employee_id is common between
these tables.
| Employees |
Emp salary |

|

|
|
|
-
Cofigure the PostgreSQL Execute Snap with a SQL query to access the tables using a JOIN command:

-
On validation, the Snaps displays the result for the SQL query as shown
below.

Upon joining the two tables as defined in the SQL query, we can see the
employee_id column in the second table is prefixed with
its table name
AVempsalary to differentiate it from the column
with the same name in the
AVemployees table.
This is how the
PostgreSQL Execute Snap handles column with conflicting names in tables when the SQL
statement contains a JOIN command.