Skip to main content

How to use aggregation in enrichment

This guide explains aggregation in Aragorn AI enrichment—rolling up multiple related rows from a supplementary project into a single value per employee.

T
Written by Tyrone Marhguy

What is aggregation?

When a supplementary project has multiple rows per employee, aggregation can:

  1. Group rows by an identifier (for example, external_employee_id).

  2. Compute a value across the group—such as sum, or collecting values into an array.

  3. Attach the result as a new column on the main project’s final dataset.

Example (sum): Daily time-clock rows show hours per day. Aggregation groups by employee_id, sums hours_worked, and creates total_weekly_hours on each employee record.

Example (payments): Multiple payment rows per employee are summed into total_payments.

When to use aggregation

  • You need totals, counts, or rollups from transactional supplementary data.

  • Latest record rule is not enough—you need math across all rows, not just the newest one.

  • One employee profile should reflect combined activity from a detail project.

Configure aggregation

  1. Log in to your Aragorn AI account.

  2. Open the main project and create or edit an enrichment linked to a supplementary project with multiple rows per person.

  3. In enrichment advanced settings, enable aggregation.

  4. Set group by — for example, external_employee_id.

  5. Choose an aggregation—for example, sum on field hours_worked or salary.

  6. Name the output field (for example, total_weekly_hours or total_payments).

  7. Preview to confirm one row per employee with the rolled-up value.

  8. Save, map the aggregated field in enrichment mapping, and reprocess the main project.

Screenshot: Aggregation settings—group by employee ID, sum hours_worked, output name total_weekly_hours.

Screenshot: Main project final dataset showing total_weekly_hours populated per employee.

Aggregation vs latest record rule

Need

Use

Most recent single row per employee

Latest record rule

Sum, count, or combine all rows per employee

Aggregation

Related articles

Did this answer your question?