Skip to Content

This example is referenced in my other post about flags to enforce the push-down of filters. Please review the other post to get a better understanding of the context for this example

 

 

Example

See the screenshot below for an overview of the model used in the example

Model of the example

 

In the model node “salesOrders” is consumed by node “noSocks” and node “all”. In “noSocks” a filter is defined. The filter that is used in “noSocks” removes all ARTICLEs with value “socks” and looks like the following:

 

Filter defined in node “noSocks” that removes all “socks”

 

This is a multiple consumer situation because node “noSocks” and “all” both consume node “salesOrders”. In these multiple consumer situations filters are not pushed-down per default because a filter even though only defined on one consumer would affect both consumers.

The inputs from nodes “noSocks” and “all” are combined in a Union and routed to the Semantics node. Therefore, ARTICLEs arrive at the output via two ways: via node “noSocks” and via node “all”.

To make identification easier of the route that a record has taken a calculated column “whatIam” is defined in “noSocks”. This column simply takes the constant value “I am no socks”:

 

Calculated column in node “noSocks” to indicate that a record arrived at the output via node “noSocks”

 

Similarly a calculated column is defined in node “all” that takes the constant value “I am all”:

 

Calculated column in node “all” to indicate that record was fed in by node “all”

 

The difference between the default behavior and an enforced filter push down on the ouput will be shown using the following data as input to node “salesOrders”:

 

Records used as input for this example

 

Default behavior (push-down is not enforced)

In the default situation, when the filter on node “noSocks” is not pushed-down to “salesOrders” ARTICLES with value “socks” will arrive at the output via node “all”. See below for a screenshot of the results.

 

output when filters are not pushed-down (default case) so that socks arrive via node “all”

 

The routes that have been taken by a record can be identified by the calculated column “whatIam” which shows that “socks” records arrive via node “all” only. Other ARTICLEs than “socks” arrive via two routes and therefore appear twice in the output.

Next, we will check flag “Ignore Multiple Outputs For Filter” in node “salesOrders”.

Behavior with enforced push-down

If flag “Ignore Multiple Outputs For Filter” is checked the filter that is defined in node “noSocks” is pushed-down to node “salesOrders” and removes all ARTICLEs that are “socks”. As a consequence, “socks” will not be transferred to node “all” as well and will not appear in the output:

 

output when filter of socks is pushed-down to node “salesorders”. In this case all “socks” are removed before reaching node “all”

 

Therefore,  in this case different results are obtained depending on whether filter push-down is enforced or not. Both results are correct given the modeling. It is up to the developer to decide which behavior is intended.

 

 

This example is referenced in my other post about flags to enforce the push-down of filters. Please review the other post to get a better understanding of the context for this example

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply