How to use distinct_count with Taurus rules?

I am trying to use Foundry Rules (previously Taurus) and I need a distinct count of the transacting counterparties. While there is a count_distinct call, I get an error everytime I attempt to use it in an expression that it is unsupported. In using Aggregation, the only count-based option is for rows so I’m not sure how I could ever use count_distinct.

Hey, two workarounds here:

  1. In Foundry Rules, use a groupby (to de-duplicate) node followed by a row count
  2. Outside Foundry Rules, create a data pipeline that takes your Foundry Rules output as input and then apply the relevant transformations

I would go with (1) as the preferred option since you will avoid needing to make a new pipeline and splitting the logic across two places, which could make it harder to understand and maintain