Delete record in Database Target

Delete Target Records

In Database schema, you can set Action attribute to delete the records from the target database table, if they are matching with the records of source database table. If Primary Key is defined in the source and target schemas, source and target records are matched based on primary key. If primary key is not defined, whole records are matched. This attribute is enabled in Data Mapper, while mapping source and target schemas.

Steps to set action attribute to delete matching records

Load required source and target schema in Data Mapper. In target schema, there will be an Action attribute.

1. Create a constant ‘delete’ and map it to Action attribute of the target schema.

In order to delete records where the target end database is ORACLE, IBM DB2, MS SQL server or HSQLDB, the keyword "delete" should be used. However for MS SQL server DBMS, the "cancel" keyword can also be used. "cancel" keyword cannot be used for other RDBMS except MS SQL server.

2. Save the Mapping activity.

Have more questions? Submit a request


Article is closed for comments.