Data 360
Data 360 SQL: the new default, and the one-way switch off Legacy SQL
Data 360 SQL is now the default engine for new queries, and moving an existing query onto it cannot be undone. What the switch changes, and how to test before you make it.
Every new query you write in Data 360 now runs on a different engine. Salesforce made Data 360 SQL the default for new compact-form and custom SQL queries, and left your existing custom queries on Legacy SQL until you move them yourself. The move is a one-way door.
That last part is the one to sit with. Once you switch a saved custom SQL query from Legacy SQL to Data 360 SQL, you cannot change it back. So the rule for the next few months is simple: run every saved query on Data 360 SQL first, confirm the result matches, and only then flip the version. Treat the switch as a deploy, not a toggle.
Data 360 SQL is in beta, which in Salesforce terms means it falls under the Beta Services Terms and can change release to release. The engine is also where the platform is going. New queries already land on it, the Query Editor builds on it, and the newer Query API and Apex paths speak it. Learning it now is cheaper than being surprised by it later.
What actually changed in your org
Three facts cover the behaviour, and they are easy to get backwards.
New compact-form queries and new custom SQL queries run on Data 360 SQL by default. Your existing custom SQL queries keep running on Legacy SQL, untouched, until someone opens them and changes the version. Nothing migrates on its own, and nothing you already rely on breaks the morning the feature turns on.
The result is an org that speaks two dialects at once. A dashboard query written last quarter runs Legacy SQL. A query a teammate writes this week runs Data 360 SQL.
The two can read the same Data Lake Object and return different results if the dialects disagree on a function, a cast, or how they handle a null. For most queries they agree. For the ones that don’t, the difference shows up as a number that moved, not as an error.
So before you touch anything, inventory what you have. List the custom SQL queries that feed a segment, a Calculated Insight, a report, or an activation, and note which ones still run Legacy SQL. That list is your migration backlog. Working from it beats discovering a drifted number in a board deck.
The switch is one-way, so test before you flip it
The mechanics are short. Open the query in the custom SQL editor, find the SQL Version dropdown, choose Data 360 SQL, confirm in the dialog, and save. Salesforce spells out the catch in the same place it offers the button: once a query is switched to Data 360 SQL, the version can’t be changed back to Legacy SQL.
A dropdown that can’t be un-chosen deserves a test step in front of it. The sequence I run for each query that matters:
- Copy the query into a new custom SQL query, which already defaults to Data 360 SQL, and run it there.
- Compare row counts and a few aggregate values against the Legacy SQL original over the same window.
- Fix whatever the new dialect reads differently, in the copy, until the two agree.
- Only then switch the original, so the object, segment, or insight that depends on it never points at an untested query.
The copy is the safety net. Because a brand-new query lands on Data 360 SQL, you get a free sandbox for the new dialect without having to spend your one-way switch to see what it does. Non-production is still the right place to do this at scale, and the usual Data 360 sandbox limits apply, so confirm the objects you need actually hold data there before you lean on it.
Data 360 SQL is a different dialect, not a faster version of the old one
The tempting mental model is that Data 360 SQL is Legacy SQL plus speed. It isn’t. Salesforce describes it as a high-performance engine that runs one SQL surface across structured, unstructured, and graph data, and a new engine brings its own function names, type-casting rules, and edge-case behaviour.
That difference is why the switch can change a result instead of only changing how fast it returns. A function that existed under Legacy SQL may be spelled differently, take different arguments, or round a decimal another way. A cast that was implicit before may need to be explicit now.
None of this is exotic, and most queries port cleanly. The ones that touch dates, nulls, or string formatting are the ones to read twice.
Salesforce ships a SQL function mapping table in the Query API migration guide for exactly this reason. Treat that table as the authority, not this post and not your memory of the old syntax.
When a query returns a different number after you move it, the mapping table is the first place to look, because the difference is almost always a function whose behaviour shifted under the new engine. Don’t assume a function behaves the same just because it compiled.
Where you meet Data 360 SQL: the editor, Apex, and the Query API
The dialect reaches past the Query Editor setting. Data 360 SQL is the language the newer programmatic paths expect, so the switch touches your integrations too.
In the Query Editor you can run Data 360 SQL against Data Lake Objects, Data Model Objects, Calculated Insight objects, and data graphs, which covers most of what you’d query interactively.
From code, you reach the same engine through the Data 360 Connect REST API and through Apex, with JDBC and Python client libraries for the tools that live outside the platform. If you already query Data 360 from Apex, this is the engine those calls increasingly run on.
The REST path is worth a specific note, because the Query API moved in the same direction. The newer Query API version adds ASYNC and ADAPTIVE execution modes where the first version only ran synchronously, which matters when a query is too big to finish inside a single request. The request body still carries your statement in a sql field, so the shape is familiar, but batch pagination changed: where you used to follow nextBatchId, you now carry a queryId to pull the next page. If you have an integration built against the old synchronous endpoint, that pagination change is the part most likely to break without a visible error, so check it against the migration guide before you assume the upgrade is transparent.
Data 360 SQL and SOQL are not the same path
One more distinction, because it trips people who read “SQL on Data 360” and reach for the wrong tool. Querying Data 360 objects with SOQL and the SET OPTIONS clause is a separate path with its own rules, meant for Salesforce-native code that wants to treat Data Model Objects like any other object. Data 360 SQL is the analytical engine underneath the Query Editor and the Query API.
They answer different questions. SOQL is how a flow or an Apex trigger reads a unified field to put it on a record. Data 360 SQL is how you shape, aggregate, and explore the lake itself, and it is the one whose default and dialect just changed. Keep them in separate drawers in your head, because the limits, the syntax, and the surfaces they run on don’t overlap.
For text enrichment inside queries, the SQL AI functions guide distinguishes sentiment labels, fixed-category classification, and beta text generation. Validate each function’s input and return contract before designing a destination field or a scheduled write path.
How I’d sequence it
Do the free part first. Write new queries and know, without thinking about it, that they already run Data 360 SQL. That builds familiarity with the dialect on work where nothing is at stake.
Then work the backlog in order of blast radius. The custom SQL queries feeding a production activation, a Calculated Insight, or a board report are the ones where a drifted number costs you, so test those against the new engine before you switch them, and leave the ad-hoc queries nobody depends on for last. The one-way switch is only a trap if you treat it like a toggle. Test the copy, match the numbers, then move the original, and the engine change becomes a scheduled chore instead of a surprise in a dashboard.
Understanding the basics
Is Data 360 SQL replacing Legacy SQL?
Data 360 SQL is the direction, not an overnight cutover. New compact-form and custom SQL queries default to Data 360 SQL, while existing custom SQL queries keep running Legacy SQL until you move them. Data 360 SQL is in beta under Salesforce’s Beta Services Terms, so confirm the current behaviour in your org’s release before you plan a wide migration.
Can I switch a query back from Data 360 SQL to Legacy SQL?
No. Once a custom SQL query is switched to Data 360 SQL, the version can’t be changed back. Test the query on Data 360 SQL in a copy, confirm the results match the Legacy SQL original, and only switch the original once you’re satisfied, because there’s no undo.
Why does my query return a different result after switching?
Data 360 SQL is a different engine, so a function, a cast, or a null-handling rule can behave differently than it did under Legacy SQL. Salesforce publishes a SQL function mapping table in the Query API migration guide. Start there, because a changed result is almost always a function whose behaviour shifted rather than a bug in your logic.
Is Data 360 SQL the same as querying Data 360 with SOQL?
No, they’re separate paths. SOQL with the SET OPTIONS clause lets Salesforce-native code query Data Model Objects like standard objects. Data 360 SQL is the analytical engine behind the Query Editor and Query API for shaping and aggregating lake data. They have different syntax, limits, and surfaces.
Moving a Data 360 pipeline onto the new engine without breaking the segments, insights, and activations that depend on it is the kind of work our integration and Data 360 practice does day to day. If your team is sitting on a backlog of Legacy SQL queries and wants the migration sequenced safely, talk to us.