Skip to content

Commit

Permalink
update: add insights_lookback_window in custom insights
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimir-remar committed May 10, 2022
1 parent 03d5a72 commit 84efdab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ def _update_insights_streams(self, insights: List[InsightConfig], default_args,
time_increment=insight.time_increment,
start_date=insight.start_date or default_args["start_date"],
end_date=insight.end_date or default_args["end_date"],
insights_lookback_window=insight.insights_lookback_window or default_args["insights_lookback_window"],
)
insight_stream = AdsInsights(**args)
insights_custom_streams.append(insight_stream)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ class Config:
pattern=DATE_TIME_PATTERN,
examples=["2017-01-26T00:00:00Z"],
)
insights_lookback_window: Optional[PositiveInt] = Field(
title="Custom Insights Lookback Window",
description=(
"The attribution window"
),
exclusiveMaximum=28,
default=28,
)


class ConnectorConfig(BaseConfig):
Expand Down

0 comments on commit 84efdab

Please sign in to comment.