# Tracking data changes in a PostgreSQL table using the tPostgreSQLSCDELT component

This scenario describes a Job that captures the employee data changes in a PostgreSQL table using SCD (Slowly Changing Dimensions) Type 1 and Type 2 methods implemented by the tPostgreSQLSCDELT component, and writes both the current and historical data in a SCD dimension table.

The input data contains various employee details including name, role, salary, and another id column is added to help ensuring the unicity of the input data.

At first, the following employee data is inserted to a new Snowflake table.

```
#id;name;role;salary
1;Mark Smith;tester;11000.00
2;Thomas Johnson;developer;12000.00
3;Teddy Brown;tester;13000.00
```

Later, the table is updated with the following renewed employee data.

```
#id;name;role;salary
1;Mark Smith;tester;15000.00
2;Thomas Johnson;tester;18000.00
3;Teddy Brown;writer;17000.00
4;John Clinton;developer;19000.00
```

You can see the role of Thomas Johnson is changed from developer to tester, the role of Teddy Brown is changed from tester to writer, and his salary is raised from 13000.00 to 17000.00. Besides, a new employee record with id 4 is inserted. In this scenario,

* the existing name and role data will be overwritten by the new data, so SCD Type 1 method will be performed on them, and

* the full history of the salary data will be retained, and a new record with the changed data will be always created and the previous record will be closed, so SCD Type 2 method will be performed on it.

For more information about SCD types, see [SCD management methodology](https://help.qlik.com/talend/en-US/components/8.0/scd/scd-management-methodology).

### In this section

* [Creating a Job for tracking data changes in a PostgreSQL table using tPostgresqlSCDELT](https://help.qlik.com/talend/en-US/components/8.0/scdelt/tjdbcscdelt-tfixedflowinput-tjdbcinput-tlogrow-creating-job-for-tracking-data-changes-in-postgresql-table-using-tpostgresqlscdelt-standard-component-create)
* [Opening a connection to a PostgreSQL database](https://help.qlik.com/talend/en-US/components/8.0/scdelt/tjdbcscdelt-tfixedflowinput-tjdbcinput-tlogrow-opening-connection-to-postgresql-database-standard-component)
* [Creating a PostgreSQL table](https://help.qlik.com/talend/en-US/components/8.0/scdelt/tjdbcscdelt-tfixedflowinput-tjdbcinput-tlogrow-creating-postgresql-table-standard-component)
* [Inserting data into the new PostgreSQL table](https://help.qlik.com/talend/en-US/components/8.0/scdelt/tjdbcscdelt-tfixedflowinput-tjdbcinput-tlogrow-inserting-data-into-new-postgresql-table-standard-component)
* [Tracking inserted data changes and writing the changes into a SCD dimension table](https://help.qlik.com/talend/en-US/components/8.0/scdelt/tjdbcscdelt-tfixedflowinput-tjdbcinput-tlogrow-tracking-inserted-data-changes-and-writing-changes-into-scd-dimension-table-standard-component)
* [Retrieving the data updates from the SCD dimension table](https://help.qlik.com/talend/en-US/components/8.0/scdelt/tjdbcscdelt-tfixedflowinput-tjdbcinput-tlogrow-retrieving-data-updates-from-scd-dimension-table-standard-component)
* [Updating data in the Postgresql table](https://help.qlik.com/talend/en-US/components/8.0/scdelt/tjdbcscdelt-tfixedflowinput-tjdbcinput-tlogrow-updating-data-in-postgresql-table-standard-component)
* [Tracking data update changes and writing the changes into the SCD dimension table](https://help.qlik.com/talend/en-US/components/8.0/scdelt/tjdbcscdelt-tfixedflowinput-tjdbcinput-tlogrow-tracking-data-update-changes-and-writing-changes-into-scd-dimension-table-standard-component)
* [Retrieve the data update changes from the SCD dimension table](https://help.qlik.com/talend/en-US/components/8.0/scdelt/tjdbcscdelt-tfixedflowinput-tjdbcinput-tlogrow-retrieve-data-update-changes-from-scd-dimension-table-standard-component)
* [Executing the Job to track data changes in a PostgreSQL table using tPostgreSQLSCDELT](https://help.qlik.com/talend/en-US/components/8.0/scdelt/tjdbcscdelt-tfixedflowinput-tjdbcinput-tlogrow-executing-job-to-track-data-changes-in-postgresql-table-using-tpostgresqlscdelt-press)

**Related reference**

* [tJDBCSCDELT](https://help.qlik.com/talend/en-US/components/8.0/scdelt/tjdbcscdelt "Tracks data changes in a source database table using SCD (Slowly Changing Dimensions) Type 1 method and/or Type 2 method and writes both the current and historical data into a specified SCD dimension table.")

**Related information**

* [tFixedFlowInput](https://help.qlik.com/talend/en-US/components/8.0/tfixedflowinput/tfixedflowinput)
* [tJDBCInput](https://help.qlik.com/talend/en-US/components/8.0/jdbc/tjdbcinput)
* [tJDBCConnection](https://help.qlik.com/talend/en-US/components/8.0/jdbc/tjdbcconnection)
* [tJDBCRow](https://help.qlik.com/talend/en-US/components/8.0/jdbc/tjdbcrow)
* [tJDBCOutput](https://help.qlik.com/talend/en-US/components/8.0/jdbc/tjdbcoutput)
* [tLogRow](https://help.qlik.com/talend/en-US/components/8.0/logs-and-errors/tlogrow)