Marketing Cloud Mondays Hands On Session

Salesforce Best Practice: One SQL query per step in Automation Studio

As a follow-up to today's presentation, Salesforce recommends the following to prevent email send failures due to incomplete data.

Prevent Timeouts and performance issues by limiting query activities to one query per step of an automation. (Optimizing a SQL Query Activity)

2 comments

Thanks for sharing, Tim!

Like I mentioned during the session, we actually ran into a similar issue—our ~2 M‑recipient send failed with OMM_SUBBATCHERR_MISSING_DE_DATA because an Automation Studio job with multiple back‑to‑back Query Activities (all set to Overwrite on the same DE) kicked off during the send window and truncated our send DE mid‑job.

Have you experienced something similar? We’re considering a dual‑DE setup—one DE we overwrite on refresh, and a separate send‑only DE to avoid mid‑send truncations.

What’s your take on using Overwrite vs. Update for Query Activities?

Hi Orlando!

Are the following automation workflows accurate to your scenario?

Automation 1

Step 1: Query 1: Overwrite Data Extension 1

Step 2: Query 2: Overwrite Data Extension 1

Automation 2

Step 1: Email Send Activity to Data Extension 1