Enrichment Function Overview

What Is an Enrichment Function?

An Enrichment function is a Project function without Input/Output parameters that is used to insert, update, or delete an LU table's data after it has already been populated from a source object. It is defined as a specific category of Fabric Regular functions.

Enrichment function features include:

  • Enrichment functions are executed once all LU tables in an LU schema have been populated. The enrichment order is determined at the LU schema level. An execution is performed only when an instance is synced.

  • An Enrichment function does not have Input and Output parameters. It can extract data from any LU table or other data sources and use it as needed.

  • One or more Enrichment function can be attached to an LU table using the Enrichment Functions field in the LU table’s Properties tab.

  • Unlike a Root function, which is executed on each record of an LU table, an Enrichment function is executed only once per LU table and LUI.

    For example, Customer 123 has five Subscribers and each Subscriber has 10 INVOICE records. The Root function that populates the INVOICE LU table runs five times for Customer 123. The Enrichment function on the INVOICE LU table runs only once per instance, after all populations run on all tables in the LU schema.

When Should I Use Enrichment Functions?

Enrichment functions are needed when complex logic must be applied on all LU table records. In this case, use an Enrichment function rather than a Root function, since an Enrichment function is executed once per LU table and LUI, while a Root function is executed on every record of the LU table.

Click for more information about the differences between Enrichment Functions and Root Functions.

Most Common Use Cases of Enrichment Functions

  • Populating an LU table based on the calculated data from other LU tables. For example, calculating the total amount of a customer's payments and updating the value in the CUSTOMER LU table.
  • Updating an external system based on the LUI data. For example, after populating the CUSTOMER table, Fabric should notify another system about the customer’s status.
  • Masking sensitive data in LU tables.

Enrichment Function Overview

What Is an Enrichment Function?

An Enrichment function is a Project function without Input/Output parameters that is used to insert, update, or delete an LU table's data after it has already been populated from a source object. It is defined as a specific category of Fabric Regular functions.

Enrichment function features include:

  • Enrichment functions are executed once all LU tables in an LU schema have been populated. The enrichment order is determined at the LU schema level. An execution is performed only when an instance is synced.

  • An Enrichment function does not have Input and Output parameters. It can extract data from any LU table or other data sources and use it as needed.

  • One or more Enrichment function can be attached to an LU table using the Enrichment Functions field in the LU table’s Properties tab.

  • Unlike a Root function, which is executed on each record of an LU table, an Enrichment function is executed only once per LU table and LUI.

    For example, Customer 123 has five Subscribers and each Subscriber has 10 INVOICE records. The Root function that populates the INVOICE LU table runs five times for Customer 123. The Enrichment function on the INVOICE LU table runs only once per instance, after all populations run on all tables in the LU schema.

When Should I Use Enrichment Functions?

Enrichment functions are needed when complex logic must be applied on all LU table records. In this case, use an Enrichment function rather than a Root function, since an Enrichment function is executed once per LU table and LUI, while a Root function is executed on every record of the LU table.

Click for more information about the differences between Enrichment Functions and Root Functions.

Most Common Use Cases of Enrichment Functions

  • Populating an LU table based on the calculated data from other LU tables. For example, calculating the total amount of a customer's payments and updating the value in the CUSTOMER LU table.
  • Updating an external system based on the LUI data. For example, after populating the CUSTOMER table, Fabric should notify another system about the customer’s status.
  • Masking sensitive data in LU tables.