How to Query Points in Time in Salesforce History Mode
Use Case
You want to use Fivetran's history mode for Salesforce to analyze objects at specific points in time.
Environment
Recommendations
Use _fivetran_start
and _fivetran_end
in your query:
select *
from salesforce.opportunity
where [timestamp] between _fivetran_start and _fivetran_end;
NOTE: We do not capture deletions of objects that you deleted and then undeleted.
Context
When you query between points in time, your query will always meet the following criteria:
- The rows returned were not deleted at that point in time
- The rows returned were active at that point in time