Issue
In Segment Engage, users may notice that SQL traits are removed from user profiles between trait computations, resulting in unexpected loss of trait values and users dropping from audiences.
Product
Twilio Segment
Environment
Segment Console
Cause
By default, SQL traits operate in a delta mode. If a user is not returned in the SQL query during a subsequent computation, Segment Engage will remove all trait values for that user. This behavior can lead to traits being nulled out if the user is no longer present in the source database or query results.
Resolution
To prevent SQL traits from being removed between runs, we configure the SQL trait as "additive." Additive traits only update with new information and do not null out values when a user or column disappears from the query. Each SQL trait must be individually set to additive; this is not a space-level setting.
Changing a SQL trait to additive ensures that trait values persist even if users are not returned in subsequent query runs. This prevents users from being dropped from audiences due to missing trait values.
If you need to set a SQL trait as Additive, please reach out to support.