Monday, June 4, 2018

Einstein Analytics: Filter Conditions in sfdcDigest

When you do not need to bring the whole data from a Salesforce object to Einstein Analytics (EA), you can filter the data when retrieving it in sfdcDigest.

With filter out unnecessary data flow to EA, this will help our dashboard builders do not need to keep filtering out certain unused data, such as inactive users for the User object. Filtering data also will increase performance on the Dataflow and consume less total of records stored in EA.

In this sample, I want to bring in all active users and not included Chatter users. So, there are 2 filters need to add in sfdcDigest:
- isActive = true
- userType = "Standard"

If you come from Salesforce background, you can simply enter isActive = true && userType = Standard, but this is different in EA. Until Summer '18 release, you need to manually enter this filter conditions in JSON format.

Add this filter in sfdcDigest under Filter Conditions:

If you see the first filter, isActive is a boolean field, so passing just true without "" will get an error when running the Dataflow, so we need to add "isQuoted": true, this is also applicable for a numeric and date field.

Let's see this in JSON Dataflow:

Another option is to use Complex Filter Conditions. For the same filter, you can simply enter this condition isActive = True and UserType = 'Standard'

Let's see this in JSON Dataflow:

If you have OR filter in the Complex Filter Conditions, you should add () around the syntax, otherwise, you will hit by an error when running the Dataflow,
example: (isActive = True OR UserType = 'Standard')

Blog last updated: 17 Dec 2018


Page-level ad