Enable Null Measure Handling
- Update your existing dataflow definition files to use null instead of 0 in defaultValue attributes for measure fields in these transformations.computeExpression defaultValue: “null”computeRelativedefaultValue: “null”dim2meameasureDefault: “null”sfdcDigestdefaultValue: “null”
- Create new instances of long-lived datasets used as a source for dataflows, using a defaultValue of null for measure fields. Long-lived datasets are typically reference datasets that are not updated through a dataflow and used to augment data in other datasets. For example, you might use a geolocation dataset to augment lead information based on zip codes.
- If you have incrementally built datasets in which the source data is no longer available, use a custom dataflow to manually convert 0 values to null. Incrementally built datasets are datasets that are created over time by appending rows, such as logs.
- Reimplement delta transformations in your dataflows, using computeRelative and computeExpression transformations. The delta transformation is not supported when null measure handling is enabled and dataflows containing delta transformations fail.In this example, the delta transformation on the left calculates the difference between an opportunity amount and its previous amount. ThecomputeRelative and computeExpression transformations on the right respectively calculate the previous amount and its difference to the current amount.delta TransformationcomputeRelative and computeExpression Transformations"Calculate_Delta": {"action": "delta","parameters": {"dimension": "OpportunityId","epoch": "CreatedDate_day_epoch","inputMeasure": "Amount","outputMeasure": "DeltaAmount","source": "Extract_Opportunity_History"}},"Compute_Previous": { "action": "computeRelative", "parameters": {"partitionBy": [ "OpportunityId"],"orderBy": [ { "name": "CreatedDate", "direction": "asc" }],"computedFields": [ { "name": "PrevAmount", "expression": {"sourceField": "Amount","offset": "previous()","default": "current()" } }],"source": "Extract_Opportunity_History" } },"Compute_Delta": { "action": "computeExpression", "parameters": {"computedFields": [ { "name": "DeltaAmount", "type": "Numeric", "precision": 18, "defaultValue": 0, "scale": 2, "saqlExpression": "Amount - PrevAmount" }],"source": "Compute_Previous" } },