Deterministic A/B Test Bucketing
Use stable IDs, salts, SHA-256 parity tests, and BigQuery checks to assign deterministic A/B test variants across SQL, Python, C#, and apps.
What
Goal - Implement A/B test bucketing as a deterministic function of salt and user_id so clients, backend code, and warehouse queries return the same variant.
Audience - Engineers and analysts building lightweight experimentation systems or validating assignments outside a hosted A/B testing platform.
Prerequisites
- A stable user identifier for logged-in users
- A warehouse table with users or events
- SQL, Python, or C# runtime access where variants need to be assigned
This guide is the implementation checklist for the longer deterministic A/B test bucketing post. Start with the post if you want the reasoning behind the approach; use the steps below when you're ready to wire the assignment function into clients, services, and BigQuery.
More guides

Chat with an AI Agent
Use Bruin Cloud's chat to ask an AI agent about your data, generate reports, and run Bruin Cloud CLI tasks like pipeline status and history.

Configure AI Agents
Create and configure AI agents in Bruin Cloud - pick a project, add messaging integrations, attach a connection set, and set permissions.

Connect Bruin Cloud MCP to Claude Code
Set up the Bruin Cloud MCP so your AI agent can query pipelines, inspect runs, and trigger actions in Bruin Cloud directly from your terminal.