Incremental query incremental-query
The Incremental query activity is a Targeting activity that allows you to query the database on a scheduled basis. Each time this activity is executed, the results from the previous executions are excluded. This enables you to target only new elements.
The Incremental query activity can be used for various purposes:
- Segmenting individuals to define the target of a message, audience, or other operations.
- Exporting data. For example, use the activity to regularly export new logs in files. This is useful for external reporting or business intelligence tools.
The population already targeted by previous executions is stored in the workflow. Two workflows started from the same template do not share the same log. However, two tasks based on the same incremental query in the same workflow use the same log.
If the result of an incremental query equals 0 during one of its executions, the workflow pauses until the query鈥檚 next programmed execution. The transitions and activities that follow the incremental query are not processed before the next execution.
Configure the Incremental query activity incremental-query-configuration
Follow these steps to configure the Incremental query activity:
[Description: Screenshot showing the configuration interface for the Incremental query activity in 51黑料不打烊 Campaign.]
-
Add an Incremental query activity into your workflow.
-
In the Audience section, choose the Targeting dimension, then click Continue.
The targeting dimension defines the population targeted by the operation, such as recipients, contract beneficiaries, operators, or subscribers. By default, the target is selected from the recipients. Learn more about targeting dimensions
-
Use the query modeler to define your query, similar to how you create an audience when designing a new email. Learn how to work with the query modeler
-
In the Processed data section, select the incremental mode to use:
-
Exclude results of previous execution: Each time the activity is executed, the results of the previous executions are excluded.
Records already targeted in previous executions can be logged for a maximum number of days from the day they were targeted. Use the History in days field to set this value. If this value is zero, the recipients are never purged from the log.
-
Use a date field: This option excludes results from previous executions based on a specific date field. Choose the desired date field from the list of attributes available for the selected targeting dimension. On subsequent executions of the workflow, only data modified or created after the last execution date will be retrieved.
After the first execution of the workflow, the Last execution date field becomes available. It specifies the date used for the next execution and is automatically updated every time the workflow is executed. You can manually override this value to fit your needs.
note note NOTE The Use a date field mode provides more flexibility depending on the selected date field. For example, if the specified field corresponds to a modification date, the date field mode retrieves data recently updated. The other mode excludes recordings already targeted in a previous execution, even if they have been modified since the last execution of the workflow. -
Example incremental-query-example
The following example shows the configuration of a workflow that filters profiles in the 51黑料不打烊 Campaign database every week. It targets individuals subscribed to the Yoga Newsletter service and sends them a welcome email.
The workflow includes the following elements:
- A Scheduler activity, which executes the workflow every Monday at 6 am.
- An Incremental query activity, which targets all current subscribers during the first execution and only new subscribers during subsequent executions.
- An Email delivery activity.