Page tree

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 39 Next »

NOTE:  Trifacta Wrangler is a free product with limitations on its features. Some features in the documentation do not apply to this product edition. See Product Limitations.

   

This example demonstrates functions that can be used to clean up strings.

Functions:

ItemDescription
$strPageTitle

Error rendering macro 'excerpt-include'

No link could be created for '$strPageTitle'.

$strPageTitle

Error rendering macro 'excerpt-include'

No link could be created for '$strPageTitle'.

$strPageTitle

Error rendering macro 'excerpt-include'

No link could be created for '$strPageTitle'.


Source:

In the following (space) and (tab) indicate space keys and tabs, respectively. Carriage return and newline characters are also supported by whitespace functions.

Stringssource
String01this source(space)(space)
String02(tab)(tab)this source
String03(tab)(tab)this source(space)(space)
String04this source's?
String05Why, you @#$%^&*()!
String06this söurce
String07(space)this söurce
String08à mañana

Transformation:

The following transformation steps generate new columns using each of the string cleanup functions:

Transformation Name New formula
Parameter: Formula type Single row formula
Parameter: Formula TRIM(source)
Parameter: New column name 'trim_source'

Transformation Name New formula
Parameter: Formula type Single row formula
Parameter: Formula REMOVEWHITESPACE(source)
Parameter: New column name 'removewhitespace_source'

Transformation Name New formula
Parameter: Formula type Single row formula
Parameter: Formula REMOVESYMBOLS(source)
Parameter: New column name 'removesymbols_source'

Results:

Stringssourceremovesymbols_sourceremovewhitespace_sourcetrim_source
String01this source(space)(space)  this source(space)(space)  thissourcethis source
String02(tab)(tab)this source(tab)(tab)this sourcethissourcethis source
String03(tab)(tab)this source(space)(space)(tab)(tab)this source(space)(space)thissourcethis source
String04this source's?this sourcesthissource's?this source's?
String05"Why, you @#$%^&*()!"Why you Why,you@#$%^&*()!Why, you @#$%^&*()!
String06this söurcethis söurcethissöurcethis söurce
String07(space)this söurce(space)this söurcethissöurcethis söurce
String08à mañanaà mañanaàmañanaà  mañana

See Also for EXAMPLE - String Cleanup Functions:

Error rendering macro 'contentbylabel'

parameters should not be empty

  • No labels

This page has no comments.