Customer Portal

Generic Reformat to Trim all strings

Comments 2

  • Avatar
    the_goat
    0
    Comment actions Permalink
    Or, alternatively it is possible to use trimming function embedded in reader components. Just enable "Trim" attribute on the field(s) you'd like to have trimmed: http://doc.cloveretl.com/documentation/UserGuide/topic/com.cloveretl.gui.docs/docs/details-pane.html. If this level of granularity is undesirable and FlatFileReader component is used, then simply turning on input trimming can be used: http://doc.cloveretl.com/documentation/UserGuide/topic/com.cloveretl.gui.docs/docs/flatfilereader.html#trimming-data.

    It is completely valid solution but may be a problem with time and/or performance sensitive applications.
  • Avatar
    paulhbartosik
    0
    Comment actions Permalink
    Thanks for the suggestion. However, setting Trim to "true" did not seem to make any change in my data. The trailing spaces remain.

    Even if it did work, it would take a lot of time to set Trim to "true" for hundreds of fields in my metadata.
    I appreciate the comment about performance. If I see performance problems, I can shift my trim statements to the SQL:

    Select trim(fieldname) as fieldname, trim(fieldname2) as fieldname2
    from tablename

    I am using DBInputTable against a MS-SQL database.

Please sign in to leave a comment.