Expand my Community achievements bar.

Join us on September 25th for a must-attend webinar featuring Adobe Experience Maker winner Anish Raul. Discover how leading enterprises are adopting AI into their workflows securely, responsibly, and at scale.

Data Distiller | A Guide to Using the INSERT OVERWRITE Command for Replacing SQL Audiences

Avatar

Employee

5/19/25

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:

Screenshot 2025-05-17 at 1.11.24 AM.png

Now, your overwrite query returns:

Screenshot 2025-05-17 at 1.12.07 AM.png

Resulting audience A1 after the overwrite:

Screenshot 2025-05-17 at 1.12.31 AM.png

Operations performed:

  • Profile B is removed

  • Profile A is updated

  • Profile C remains unchanged

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.