User Community Service Desk Downloads

Add Attributes Step

Adds new attributes to your data flow using ONE expressions.

This step is available for all transformation types: standalone plans, embedded plans, transformation rules, and transformation catalog items.

Overview

The Add Attributes step creates new columns in your data flow by evaluating expressions. Use this step when you need to derive new values from existing data, add calculated fields, or create constants.

Use this step to:

  • Combine multiple attributes into a single value.

  • Calculate derived values (totals, averages, percentages).

  • Add constant values or flags to your data.

  • Format or transform existing data into new attributes.

  • Create lookup keys by combining multiple fields.

Configuration

Add an attribute

  1. In the step configuration, select Add expression.

  2. Configure the new attribute:

    • Attribute name: Enter a name for the new attribute. Use clear, descriptive names that indicate the attribute’s purpose.

    • Data type: Select the appropriate data type (String, Integer, Long, Double, Boolean, Date, Datetime).

    • Expression: Define the value using a ONE expression.

  3. Select Add expression again to add additional attributes as needed.

Expression examples

Concatenate text values
trim(first_name + ' ' + last_name)

Creates a full name by combining first and last name, trimming whitespace.

Calculate a percentage
iif(total_tasks = 0, null, round((toFloat(completed_tasks) / toFloat(total_tasks)) * 100, 2))

Calculates completion percentage with type conversion and division-by-zero protection.

Conditional value
iif(amount > 1000, 'High', 'Standard')

Assigns a category based on a condition.

Extract year from date
datePart(order_date, 'YEAR')

Extracts the year component from a date field.

Create a composite key
region_code + '-' + toString(customer_id)

Combines multiple fields into a single key value.

Add a constant
'PROCESSED'

Adds a static value to all records.

Best practices

Use descriptive attribute names

Choose names that clearly indicate what the attribute contains. Avoid generic names like new_column or calc1.

Match data types to expressions

Ensure the selected data type matches what your expression returns. A mismatch can cause errors or unexpected results.

Handle null values

Consider what should happen when input values are null. Use functions like coalesce() or isnull() to provide default values.

Keep expressions focused

Each attribute should serve a single purpose. Complex logic is easier to maintain when split across multiple attributes.

Test expressions

Use the expression testing feature to validate your expressions before running the full transformation.

Comparison with Transform Data step

Aspect Add Attributes Transform Data

Purpose

Creates new attributes

Modifies existing attribute values

Original data

Preserved (new columns added)

Overwritten (values replaced)

Use case

Derive new values while keeping originals

Clean or standardize existing values

Was this page useful?