In this article, we will discuss best practices around the combine attributes task template and concatenate attributes task template. You can learn more about the combine attributes task template here, and the concatenate attributes task template here.
Combine Attributes
The combine attributes task template can be used to combine attributes from multiple attributes into a single attribute.
- Select attributes to combine - Select more than one attribute from your input data source you would like combined into a single attribute.
- Write combined values to - create a new attribute, or select an existing attribute that will contain combined attributes.
- Specify delimiter - specify how values from each combined attribute should be separated. The default delimiter is a comma.
When to use Combine Attributes
Use this task template when you want to:
- Combine values from the first name field with values from the last name field to create a new "Full Name" field.
- Combine values from various geo-fields to create a complete address field.
Concatenate Attributes
The concatenate attributes task template can be used to combine values from multiple attributes into a single attribute and add static text.
- Source - select attributes from the input data source you will want combined. Type the @ symbol and then select attributes from the pick list. The attribute will be enclosed in double curly brackets {{ }}. Add any static text outside of the curly brackets.
- Target attribute - create a new attribute, or a select an existing attribute from the input data source that will contain outputs to the concatenated attributes.
When to use Concatenate Attributes:
Use this task template when you want to:
- Combine values from the first name field with values from the last name field to create a new "Full Name" field. Separate first and last name with a space.
- Combine values from various geo-fields to create a complete address field. Add static text between attributes to create a desired address line.
- Create a new "description" or "notes" field" that organizes long strings of text. (Ex: "Notes: abcd xyz).
Combine Attributes v. Concatenate Attributes
The combine attributes task template will remove duplicates from your input data source, while the concatenate attributes task template will keep all values.
If you are using the combine attributes task template on duplicate records, only one surviving record will contain combined values in the output field. If you are using the concatenate attributes task template on duplicate records, all duplicate records will contain combined values in the output field.