
Yes. A data clean room can run custom SQL queries on your own data models if it supports analyst-authored SQL and the collaboration permits your inputs, joins and outputs. You can own the query without having permission to read a partner’s raw records or export the result you asked for.
TL;DR
Yes, but check who can write the SQL and who can release the results. A product described as supporting SQL can still limit analysts to templates written by a provider or approved by a partner. If your team needs to change the calculation rather than just its inputs, ask to demonstrate that distinction before you choose a platform.
Analyst-authored SQL
Approved query templates
Warehouse-side modelling
These approaches can coexist. You can prepare a model in your warehouse, use custom SQL to test a measurement question and turn the approved calculation into a template for recurring reporting. If you’re scoping that split for clients, start with the data clean room guide for media agencies.
In-housing programmatic means deciding which parts of measurement your team owns. If an analyst can change the date range but cannot correct how repeat buyers are counted, your team operates the report without owning its logic. For a 2026 platform review, bring a metric your team has already had to redefine. Ask to make that change under the same permissions analysts would have in production.
In this context, a data model is often a prepared table or view: for example, an orders dataset with your definitions for completed sales and refunds. You can supply an approved version of that model and ask the clean room to combine it with permitted ad exposure data. Your partner does not need access to the full source schema just because the approved query uses the resulting dataset.
Make the unit of analysis explicit. An order, a customer and an ad exposure are different things, and joining them without accounting for repeated records can inflate a count. A clean room’s privacy controls do not fix that calculation. Validate what each row represents before you match it to partner data.
Using model scores in a query is different from running the model itself. If you already score customers in your warehouse, you can propose an approved input containing score bands, then ask whether the clean room can report campaign outcomes by band. That does not establish that the platform can train the model, run your Python code or score new records inside the collaboration.
If training or inference must happen inside the clean room, give that requirement its own acceptance test. Specify the runtime, who supplies the input data, and what the output needs to contain. For a 2026 evaluation, do not let a successful query on precomputed scores count as proof that the model itself ran there.
Use a real reporting question with an approved test dataset. Suppose your team wants a weekly count of completed orders after ad exposure, with comparisons for a 7-day window and a 30-day window. Ask for 1 row per campaign per week in the released report, if the policy permits that level of detail. These are example report specifications, not privacy thresholds or recommended attribution defaults.

For a 2026 pilot, give the acceptance test to the person who will own the report after launch. Ask them to rerun it after an input refresh and reconcile the answer to the expected figures. A demo shows that a query can run; an analyst-led rerun shows whether your team can maintain the workflow.
Keep attribution and incrementality separate. Counting purchases that follow an exposure does not show how many purchases the advertising caused. If the decision is whether the campaign drove additional sales, start with an appropriate test design and use the clean room to calculate the agreed result.
Custom SQL support varies with the platform’s execution rules and the data-sharing terms of each collaboration. Check these separately: the same platform can support analyst-written SQL in one collaboration and limit your team to approved templates in another.
Yes, if the collaboration accepts an approved table or view derived from the model. Keep unrelated transformations and fields in your warehouse, then supply only what the agreed query needs. Verify whether the integration queries an approved view in place or requires a prepared dataset to be shared or copied; those arrangements have different implications for refreshes and access.
Yes, you can use an approved aggregate report to inform a buying decision. Using cohort-level findings to review a publisher deal is different from sending a list of users to a buying platform. Treat activation as a separate request with its own permissions, accepted inputs and test.
Cake.Shop’s swweetshop is the platform that powers programmatic in-housing for brands and independent agencies. The Cake.Shop stack spans modular media buying and reporting, rich media and digital out-of-home (DOOH) creative, data clean rooms and direct publisher supply. The point of evaluating these together is to see whether your team can connect how it bought the media, which creative it ran and what it can measure.
Take a retailer comparing campaign results across publisher deals. Buying and supply records tell you what ran and where; creative records tell you which version ran; the clean room measurement plan defines how approved exposure data and first-party orders can be analysed together. If your buying records use deal IDs but your approved measurement input only identifies campaigns, you cannot assume the output will support a deal-level comparison. Check which identifiers survive each handoff before you make that cut a reporting requirement.
Put your hardest query in the 2026 brief. If you’re speaking with Cake.Shop about an in-house programmatic stack, bring the intended input fields, a sample of your SQL and the output the buyer needs. Ask to see that workflow under the proposed partner rules. A discussion about the full stack does not replace an acceptance test for your model.
Can I write my own SQL in a data clean room?
Yes, if the clean room supports analyst-authored SQL and the collaboration grants your role permission to submit it. Ask whether you can change the calculation or only fill in approved parameters.
Do I need to rebuild my warehouse models for the clean room?
No, not if the collaboration accepts an approved table or view that your existing model produces. Check how updates reach the collaboration and which columns it can use.
Can I join my CRM data to a publisher’s exposure data?
Yes, if both parties approve the matching fields, permitted join and intended output. Approval to match does not mean your analysts can browse the publisher’s exposure records.
Can I export the results of custom SQL queries?
You can export results only if the collaboration permits that result and destination. Check which fields and aggregation levels can leave the clean room, and who can export them.
Can a data clean room run my Python or machine learning model?
Custom SQL support does not establish that a clean room can run Python or train a machine learning model. Test the required runtime separately, or ask whether the collaboration can accept scores computed in your own environment.
Why did my query run but return no usable result?
A query can run without producing a releasable result if its output does not meet the collaboration’s rules. Check whether the issue is no matching data, a restricted field or a result group that failed the release policy.
Can custom SQL prove that ads caused more sales?
No. SQL can calculate an incrementality estimate from a suitable study, but counting orders after exposure does not establish causation on its own.
Make a withheld result part of your 2026 sign-off. Pick an approved test case where you expect a result group to fall below the collaboration’s release rule. Make sure your analyst can distinguish a withheld result from a genuine zero, and that your reporting workflow preserves that distinction. Otherwise a privacy decision can show up in the buyer’s report as a performance verdict.
Data clean room DSP activation works when your destination accepts the approved audience. Compare connection routes and test what reaches your DSP.
Read more →A data clean room can share retail data insights without exposing PII. See what to share, what to block and how to check outputs before release.
Read more →A programmatic advertising pilot budget test works when you ask one clear question. Set the spend cap, pick a KPI and decide what earns a bigger test.
Read more →Book a 30-minute demo and see exactly how Cake.Shop works — no sales pitch, just the platform.