Table of Contents

Search

  1. Preface
  2. Transformations
  3. Source transformation
  4. Target transformation
  5. Access Policy transformation
  6. Aggregator transformation
  7. B2B transformation
  8. Chunking transformation
  9. Cleanse transformation
  10. Data Masking transformation
  11. Data Services transformation
  12. Deduplicate transformation
  13. Expression transformation
  14. Filter transformation
  15. Hierarchy Builder transformation
  16. Hierarchy Parser transformation
  17. Hierarchy Processor transformation
  18. Input transformation
  19. Java transformation
  20. Java transformation API reference
  21. Joiner transformation
  22. Labeler transformation
  23. Lookup transformation
  24. Machine Learning transformation
  25. Mapplet transformation
  26. Normalizer transformation
  27. Output transformation
  28. Parse transformation
  29. Python transformation
  30. Rank transformation
  31. Router transformation
  32. Rule Specification transformation
  33. Sequence transformation
  34. Sorter transformation
  35. SQL transformation
  36. Structure Parser transformation
  37. Transaction Control transformation
  38. Union transformation
  39. Vector Embedding transformation
  40. Velocity transformation
  41. Verifier transformation
  42. Web Services transformation

Transformations

Transformations

Field rule configuration examples

Field rule configuration examples

The following examples show how you can configure field rules in a transformation.

Changing incoming field names

You need to create a mapping to gather revenue data from multiple sales locations. You learn that multiple fields from the upstream transformation have the same names as fields in a source transformation. To avoid field name conflicts, you change the field names for all incoming fields so that the source is distinguishable throughout the mapping. To change the names of incoming fields, you create a field rule to rename all fields with the SalesForce_ prefix.
To increase performance, you want to ensure that the data set only includes required data. You determine that information regarding transaction dates is not required, so you remove the data fields from the mapping. You create a rule to exclude fields that are not required. To exclude date fields, you create a rule to exclude fields with a date/time data type.
You review the order of the rules. You want the rule to rename the fields to run after the rule to exclude the date/time fields. You move the rule to remove date/time fields so that it appears before the renaming rule.

Removing patterns in field names

You can use parentheses to group different patterns and use a reference to replace the pattern. In a regular expression, parentheses group the patterns to be matched. You can use a
($)
reference to select a group matched in the input string.
You might need to change patterns in fields between transformations. If fields in an upstream transformation contain the suffix
_out
, you can remove the suffix from the field names in the current transformation. Use the following expression to remove the
_out
suffix:
(.*)_out/$1
. The
(.*)
part of the expression matches all the field name characters,
_out
matches the suffix, and
$1
references the input string specified by the matched
(.*)
field name characters.
The following expression shows another example:
(.*)(_)out/$1
In a matched string of
string_out
, for example, the matches are
$1
for
string
,
$2
for
_
, and
$3
for
out
. The
string
value is referenced by
$1
because
string
is the first group in the match.
After you apply this field rule to rename the fields, Data Integration appends a suffix, beginning with 1, to multiple fields with the same name. This convention removes duplicate field names.

0 COMMENTS

We’d like to hear from you!