Enrichment Function vs. Root Function - Comparison Analysis

Enrichment functions and Root functions are both Fabric Project functions that can run complex logic on LU tables like invoking Fabric commands, complex data manipulations and SQL statements on different DB interfaces. Both Enrichment functions and Root functions run during an LUI sync. There are major differences between Root functions and Enrichment functions and it is important to understand them in order to select the correct solution for each scenario.

The following table displays the comparison analysis between Enrichment and Root functions and provides insight on how and when each function type should be used.

 

Enrichment Function

Root Function

Function Type

Regular function.

Root function.

Structure

The Enrichment function does not have any Input/Output parameters.

The Root function must have at least one Input parameter and yield an array of Objects (Object[]).

Execution Time

Executed after populating all LU tables in the Logical Unit.

Upon LU Table population.

Operation

Performs insert, update, or delete of an LU table's data after it has already been populated from a source object.

Populates the LU table.

Number of Objects

Multiple Enrichment functions can be attached to an LU table. One Enrichment function can be attached to multiple LU tables.

Only one Root function per one Table Population object.

Execution Order

Enrichment execution order is defined at the LU Schema level.

Population execution order is defined at the population level.

Access to LU Tables

Can extract data from any LU table within the Logical Unit since it is executed after the population of all LU tables.

Can access other LU tables if their population execution order is smaller than the execution order of the current population.

Number of Executions

The Enrichment function runs once per LU table and LUI. 

For example:

There are 1,500 subscribers for Customer 1. Each subscriber has multiple services.

The Enrichment function runs once and updates all the services of Customer 1.

The number of executions of a Root function equals the number of records in the parent table.

For example:

There are 1,500 subscribers for Customer 1. Each subscriber has multiple services.

The Root function on the Services LU table runs 1,500 times and selects the services of each subscriber separately.

Previous

Enrichment Function vs. Root Function - Comparison Analysis

Enrichment functions and Root functions are both Fabric Project functions that can run complex logic on LU tables like invoking Fabric commands, complex data manipulations and SQL statements on different DB interfaces. Both Enrichment functions and Root functions run during an LUI sync. There are major differences between Root functions and Enrichment functions and it is important to understand them in order to select the correct solution for each scenario.

The following table displays the comparison analysis between Enrichment and Root functions and provides insight on how and when each function type should be used.

 

Enrichment Function

Root Function

Function Type

Regular function.

Root function.

Structure

The Enrichment function does not have any Input/Output parameters.

The Root function must have at least one Input parameter and yield an array of Objects (Object[]).

Execution Time

Executed after populating all LU tables in the Logical Unit.

Upon LU Table population.

Operation

Performs insert, update, or delete of an LU table's data after it has already been populated from a source object.

Populates the LU table.

Number of Objects

Multiple Enrichment functions can be attached to an LU table. One Enrichment function can be attached to multiple LU tables.

Only one Root function per one Table Population object.

Execution Order

Enrichment execution order is defined at the LU Schema level.

Population execution order is defined at the population level.

Access to LU Tables

Can extract data from any LU table within the Logical Unit since it is executed after the population of all LU tables.

Can access other LU tables if their population execution order is smaller than the execution order of the current population.

Number of Executions

The Enrichment function runs once per LU table and LUI. 

For example:

There are 1,500 subscribers for Customer 1. Each subscriber has multiple services.

The Enrichment function runs once and updates all the services of Customer 1.

The number of executions of a Root function equals the number of records in the parent table.

For example:

There are 1,500 subscribers for Customer 1. Each subscriber has multiple services.

The Root function on the Services LU table runs 1,500 times and selects the services of each subscriber separately.

Previous