Remove deleted records from DAL pipeline processing
This commit is contained in:
@@ -1801,7 +1801,7 @@ func recordReportToDalPipeline(m *types.Module, metrics, dimensions, f string) (
|
||||
pp = dal.Pipeline{
|
||||
&dal.Datasource{
|
||||
Ident: "ds",
|
||||
Filter: filter.Generic(filter.WithExpression(f)),
|
||||
Filter: filter.Generic(filter.WithExpression(f), filter.WithStateConstraint("deletedAt", filter.StateExcluded)),
|
||||
ModelRef: dal.ModelRef{
|
||||
ConnectionID: m.Config.DAL.ConnectionID,
|
||||
ResourceID: m.ID,
|
||||
|
||||
@@ -459,6 +459,12 @@ func convStepLoad(pr modelFinder, step types.ReportStepLoad, defs FrameDefinitio
|
||||
return
|
||||
}
|
||||
|
||||
// @todo refactor this out after we support other resources with potentially missing soft delete fields
|
||||
f, err = f.MergeFilters(filter.Generic(filter.WithStateConstraint("deletedAt", filter.StateExcluded)))
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
// Make pipeline step
|
||||
return &dal.Datasource{
|
||||
Ident: step.Name,
|
||||
|
||||
Reference in New Issue
Block a user