pfx-sql:delete

Deletes data from a database table with a filter.

Properties

Option

Type

Default

Description

Option

Type

Default

Description

dataSource

string

dataSource

Defines a Data Source name.

table

string

 

Defines a DB table.

filter

string

 

Defines a filter for the delete command.

Examples

Deletes from a table defined in the URI parameter of the pfx-sql component using a predefined filter.

Filter:

<filter id="deleteFilter"> <and> <criterion fieldName="price" operator="greaterThan" value="100"/> <or> <criterion fieldName="sku" operator="greaterThan" value="'1'"/> <criterion fieldName="testCol" operator="notNull"/> </or> <not> <criterion fieldName="timeCol" operator="lessThan" value="'2021-01-14 00:00:00.0'"/> </not> </and> </filter>

Route:

<routes xmlns="http://camel.apache.org/schema/spring"> <route> <from uri="direct:sql-delete"/> <to uri="pfx-sql:delete?dataSource=dataSource&amp;table=cars&amp;filter=deleteFilter"/> </route> </routes>

 

IntegrationManager version 5.8.0