In this post, we’ll explore how to manage dynamic SQL audience in Data Distiller by using the INSERT OVERWRITE INTO command. This capability enables you to fully refresh the contents of an audience with the results of a new SQL query, making it ideal for use cases that require recurring or complete audience updates, such as monthly re-qualification or based on customer behavioral pattern.
What is INSERT OVERWRITE INTO?
Unlike the standard INSERT INTO command, which adds new profiles to an existing audience, INSERT OVERWRITE INTO removes all current audience members and replaces them with only the profiles returned by your SQL query. This ensures precision and control when updating SQL audience definitions at scale.
Audience Behavior in Real-Time Customer Profile
When an overwrite occurs, Real-Time Customer Profile applies the following logic:
New profiles in the batch → marked as entered
Removed profiles (not in the new batch) → marked as exited
Unchanged profiles → no action taken
This ensures accurate SQL audience membership tracking in downstream workflows and activations.
Example Scenario
Assume the original audience A1 contains:

Now, your overwrite query returns:

Resulting audience A1 after the overwrite:

Operations performed:
Similarly, if a new profile is added using INSERT OVERWRITE INTO, the final SQL audience will include that new profile along with the others returned by the query.
Conclusion
The INSERT OVERWRITE INTO command is a powerful tool for managing SQL audiences dynamically. It allows you to refresh segments with full precision, aligning them with evolving business logic and customer behavior. Whether used for periodic audience updates or complete requalification, it simplifies and streamlines audience lifecycle management in Data Distiller.
Author: @_Sameeksha_ and @Manan B.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.