Welcome Guest! Log in
Stambia versions 2.x, 3.x, S17, S18, S19 and S20 are reaching End of Support January, 15th, 2024. Please consider upgrading to the supported Semarchy xDI versions. See Global Policy Support and the Semarchy Documentation.

The Stambia User Community is moving to Semarchy! All the applicable resources have already been moved or are currently being moved to their new location. Read more…


The Replicator Rdbms supports two powerful properties which can let you alter select / insert expressions.

 

These properties work like patterns : their value is executed as an Xpath expression where [columnName] is replaced with the source column name, or [value] with the inserted value.

We are going to use these properties to apply a trim() function on a selection of columns, either on the source or the target.

 

Trimming at selection on the source

The idea is to apply a trim() to every selected column whose type is CHAR.

   {if (tech:type()='CHAR') then concat('trim(',tech:columnName(),')') else tech:columnName()}

Note : [columnName] cannot be used here because we opened an Xpath context with the curly brackets {}, this is why we use the Xpath expression tech:columnName() instead.

Trimming at insertion into the target

 {if (tech:type() = 'STRING') then 'trim([value])' else '[value]'}

 

 

Articles

Suggest a new Article!