Data views in SFMC
Data Views in SFMC are system-generated tables that store tracking and subscriber data. These tables provide insights into email sends, clicks, opens, bounces, unsubscribes, and more. They are primarily used in SQL queries within Automation Studio to extract and analyze historical data.
- Key Features of Data Views
- Prebuilt System Tables – SFMC automatically generates and maintains these tables.
- Historical Data Storage – Most tables retain data for six months.
- SQL Querying – You can access Data Views using SQL activities in Automation Studio.
- Read-Only – Data Views cannot be edited or modified; they are strictly for querying.
- List of Common Data Views in SFMC
- a) Subscriber & Send Tracking
Data View |
Description |
_Subscribers |
Contains subscriber details like SubscriberKey, EmailAddress, Status (Active, Bounced, Unsubscribed). |
_Sent |
Logs every email send event, storing JobID, SubscriberKey, SendTime, etc. |
_Job |
Stores metadata about email sends (e.g., JobID, EmailSubject, FromEmail). |
- b) Engagement & Interaction Tracking
Data View |
Description |
_Open |
Tracks email open events (EventDate, JobID, SubscriberKey). |
_Click |
Logs click activities, including URL, JobID, and SubscriberKey. |
_Bounce |
Contains bounce details (BounceType, BounceReason, SubscriberKey). |
_Unsubscribe |
Records unsubscribed users along with EventDate, JobID. |
- c) Mobile Data Views
Data View |
Description |
_SMSMessageTracking |
Captures sent SMS details (JobID, SubscriberKey, MessageText). |
_SMSSubscriptionLog |
Logs SMS opt-ins and opt-outs. |
- d) Journey Builder & Automation Tracking
Data View |
Description |
_Journey |
Contains metadata of Journeys (JourneyID, Name, Version). |
_JourneyActivity |
Tracks Journey Builder activity execution (ActivityType, SubscriberKey). |
_AutomationInstance |
Logs Automation Studio executions (AutomationID, Status, RunTime). |
- Understanding Key Columns in Data Views
Example: _Sent Table
Column |
Description |
JobID |
Unique identifier for an email send. |
SubscriberKey |
Unique identifier for the recipient. |
EventDate |
The timestamp when the email was sent. |
AccountID |
The SFMC account identifier. |
Example: _Click Table
Column |
Description |
JobID |
Email job identifier. |
SubscriberKey |
Subscriber who clicked the link. |
EventDate |
The timestamp of the click event. |
LinkName |
Name of the clicked link. |
URL |
The actual clicked URL. |
- Example SQL Queries Using Data Views
(a) Retrieve Click Activity for the Last 7 Days
SELECT
c.SubscriberKey,
c.EventDate AS ClickDate,
c.LinkName,
c.URL
FROM _Click c
WHERE c.EventDate >= DATEADD(DAY, -7, GETDATE())
(b) Get Email Open Rates for a Specific Campaign
SELECT
s.JobID,
s.EmailName,
COUNT(DISTINCT o.SubscriberKey) AS OpenCount,
COUNT(DISTINCT s.SubscriberKey) AS TotalSent,
(COUNT(DISTINCT o.SubscriberKey) * 100.0 / COUNT(DISTINCT s.SubscriberKey)) AS OpenRate
FROM _Sent s
LEFT JOIN _Open o ON s.JobID = o.JobID AND s.SubscriberKey = o.SubscriberKey
WHERE s.JobID = ‘123456’ — Replace with actual JobID
GROUP BY s.JobID, s.EmailName
(c) Get Unsubscribes for the Last 30 Days
SELECT
u.SubscriberKey,
u.EventDate AS UnsubDate
FROM _Unsubscribe u
WHERE u.EventDate >= DATEADD(DAY, -30, GETDATE())
(d) Identify Hard Bounced Emails
SELECT
b.SubscriberKey,
b.BounceType,
b.BounceReason
FROM _Bounce b
WHERE b.BounceType = ‘HardBounce’
(e) Track Journey Engagement
SELECT
j.JourneyName,
ja.ActivityType,
ja.SubscriberKey,
ja.EventDate
FROM _JourneyActivity ja
JOIN _Journey j ON ja.JourneyID = j.JourneyID
WHERE ja.EventDate >= DATEADD(DAY, -30, GETDATE())
- Best Practices for Using Data Views
Optimize Your Queries
- Use indexed columns like JobID, SubscriberKey, and EventDate to improve performance.
- Filter queries using WHERE conditions to avoid unnecessary data retrieval.
Schedule Automation for Reporting
- Set up an Automation Studio SQL Query Activity to run reports periodically.
- Export query results to a Data Extension for easy access.
Combine Multiple Data Views for Deeper Insights
- Join _Sent with _Open and _Click for engagement analysis.
- Use _Unsubscribe and _Bounce to identify inactive users.
Check Data Retention Period
- Most Data Views only retain data for 6 months.
- If you need long-term tracking, store query results in Data Extensions.
- Limitations of Data Views
Not Editable – You cannot update, insert, or delete records in Data Views.
Limited Retention – Historical data is available only for six months.
SQL-Only Access – You must use SQL queries; no UI-based filters exist.
- When to Use Data Views vs. Data Extensions
Use Case |
Use Data Views? |
Use Data Extensions? |
Track email performance (opens, clicks, bounces) |
|
|
Store long-term engagement data |
|
|
Query only active subscribers |
|
|
Modify or insert new subscriber data |
|
|
- Conclusion
- SFMC Data Views are a powerful way to track subscriber activity, engagement, and campaign performance.
- Use SQL in Automation Studio to extract insights and generate reports.
- Store long-term data in Data Extensions if needed.