You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
source-salesforce-native: backfill formula fields on a schedule
Salesforce formula fields are calculated at query time - they are not
saved in Salesforce's database, so they don't have any prior state. This
means that any updates to formula fields don't always cause an object's
cursor field to update, and formula fields can be outdated. This is known
to happen when formula fields are calculated based on data external to
its object (ex: other objects, a global variable, specific times, etc.).
To fix this, we leverage the recently added `RecurringFetchPageFn` type
of `fetch_page` & the `ResourceConfigWithSchedule` to backfill formula
fields at some cadence. A top level merge reduction strategy is used for
these collections in order to merge in the updated formula fields. The
default schedule is currently once a day at 23:55 UTC, but that can be
changed as we learn more about how frequently users want these scheduled
formula field backfills to occur & what the typical API limit impact
looks like.
description="Schedule to automatically refresh formula fields. Accepts a cron expression.",
107
+
pattern=CRON_REGEX
108
+
)
109
+
110
+
101
111
classEndpointConfig(BaseModel):
102
112
start_date: AwareDatetime=Field(
103
113
description="UTC data and time in the format YYYY-MM-DDTHH:MM:SSZ. Any data generated before this date will not be replicated. If left blank, all data will be replicated.",
0 commit comments