On this page

For AI agents: a documentation index is available at /llms.txt. Append .md to any page URL for markdown, or send Accept: text/markdown.

Pipeline Overview

Understand what Statsig runs on your warehouse

Statsig Warehouse Native runs a pipeline in your warehouse that turns raw exposure and metric data into experiment results, from identifying users' first exposures through calculating group-level summary statistics.

Pipeline Overview names the artifacts Statsig provisions to describe that pipeline: the pipeline_overview table in your warehouse, the metric source built on it, and the dashboard that charts it. To check whether individual pipeline runs are succeeding right now, go to Pipeline Activity in the Statsig Console.

Automatic setup

When you create a warehouse connection, Statsig provisions the Pipeline Overview for you. During connection creation, Statsig creates the pipeline_overview table, the Pipeline Overview metric source, and the linked Pipeline Overview dashboard. This runs automatically and needs no action from you. Automatic setup applies to all supported warehouses, including Amazon Athena, Snowflake, BigQuery, Redshift, and Databricks.

Main steps

The main steps in the pipeline are:

  • Identifying users' first exposures
  • Annotating Metric Sources with exposure data
  • Creating metric-user-day level staging data
  • Running intermediate rollups for better performance
  • Calculating group-level summary Statistics

Statsig runs the analysis pipeline inside your warehouse in five steps: it creates or updates cumulative exposures from the filtered exposure source, joins each filtered Metric Source to those exposures, calculates user-day metric values into staging tables, runs intermediate rollups, then calculates results and writes Pulse result tables. Only two outputs leave your warehouse for Statsig Storage: the exposure timeseries and the Pulse result tables. Statsig runs the analysis pipeline inside your warehouse in five steps: it creates or updates cumulative exposures from the filtered exposure source, joins each filtered Metric Source to those exposures, calculates user-day metric values into staging tables, runs intermediate rollups, then calculates results and writes Pulse result tables. Only two outputs leave your warehouse for Statsig Storage: the exposure timeseries and the Pulse result tables.

Types of DAGs

Statsig lets you run your pipeline in a few different ways:

  • A Full Refresh totally restates the experiment's data and calculates it from scratch. This is useful for starting an experiment, or if underlying data has changed.
  • An Incremental Refresh appends new data to your experiment data. This reduces the cost of running scheduled updates to your results.
  • A Metric refresh lets you update a specific metric in case you changed a definition, or want to add new metrics to your analysis.

Artifacts and entity relationships

Statsig generates and stores the following tables in your warehouse per-experiment. You have full access to these data sources for your own analysis, models, or visualizations. For experiments, experiment_id is the name of the experiment; for Feature Gates, experiment_id is the name of the gate along with the specific rule ID (for example, chatbot_llm_model_switch_31e9jwlgO1bSSznKntb2gp_exposures_summary).

This isn't an exhaustive list, but it includes most of the core result and staging tables useful for your own analysis.

These are internal tables and change as the product evolves. Statsig documents changes here.

The high-level relationships and contents of these tables appear in the entity relationship diagram below. Refer to the Main steps diagram above for scheduling details.

The pipeline turns two tables you provide, an assignment source and a metric source, into experiment results. The assignment source is deduplicated into FIRST_EXPOSURES, which both rolls up into the EXPOSURES_SUMMARY timeseries and, together with the metric source, feeds the METRIC JOIN and FUNNEL JOIN stages. Those joins produce the UNIT_DAY_METRICS and FUNNEL_EVENTS staging tables, which roll into WINDOWED_METRICS by windowed aggregation and then up to the group_id level into the final RESULTS table. The pipeline turns two tables you provide, an assignment source and a metric source, into experiment results. The assignment source is deduplicated into FIRST_EXPOSURES, which both rolls up into the EXPOSURES_SUMMARY timeseries and, together with the metric source, feeds the METRIC JOIN and FUNNEL JOIN stages. Those joins produce the UNIT_DAY_METRICS and FUNNEL_EVENTS staging tables, which roll into WINDOWED_METRICS by windowed aggregation and then up to the group_id level into the final RESULTS table.

Other jobs

Alongside and inside this main flow, Statsig also:

  • Runs Health Checks and a Summary View for exposures
  • Calculates top dimensions for dimensional metrics
  • Calculates funnel steps
  • Runs CUPED and Winsorization procedures during the group-level summaries to reduce variance and outlier influence
  • Calculates inputs to the Delta Method to avoid bias on Ratio and Mean metrics

Statsig generates experiment-level tables, making it easy to run follow-up analyses on specific experiments.

Visibility

Select the history icon on your pulse results to see the jobs and IDs Statsig ran for each pulse reload, along with compute time and cost.

This information is also visible in your warehouse's own history and usage management. Having the costs in the console is useful for cross-functional experimentation teams running the analysis.

Exposure export table

Statsig records eligible production first exposures in the forwarded exposures table configured in your warehouse Data Connection. The daily export is the authoritative record. Results reloads may forward recent exposures earlier, but these updates are best-effort and can be incomplete. The daily export may replace them.

By default, the daily export excludes experiment groups at 0% or 100% traffic share. This is the group split, not the experiment's overall allocation. If you need these experiment exposures, contact Statsig Support.

For feature gates at 0% or 100% rollout, turn on the project and per-gate settings below. For forwarding requirements, go to Forwarded Data.

To record exposures for a feature gate at 0% or 100% rollout:

  1. A project admin goes to Settings > Project Configuration > Feature Management and turns on Enable exposure tracking for 0/100% rolled out Gates.
  2. On each gate that needs these exposures, turn on Store 0/100 Exposures.

Statsig bills these exposures as analytic events. For experiment variants with 0% or 100% traffic allocation, contact Statsig Support.

Statsig populates user_dimensions in the daily deduplicated export. Fast-forwarded exposure rows can omit some fields in this object until the next daily load.

Common fields in user_dimensions

user_dimensions contains user attributes captured alongside the first exposure. The exact shape can vary by SDK and project configuration, but these are some of the most common fields you may see:

Additional non-null fields from the SDK user object may also appear in user_dimensions. Statsig typically exports custom IDs as dedicated top-level columns in the exposure table rather than querying them from this object.

Statsig uses input fields such as deviceOS and systemName to derive the exported os field. If you want to analyze operating system on forwarded exposures, query user_dimensions.os.

Event export table

If you log custom events through a Statsig SDK, Statsig also forwards those events into a configurable table in your warehouse. This is the table used when Warehouse Native customers rely on Statsig SDK logging for outcome events.

  • Use user_object for user fields associated with the event.
  • Use statsig_metadata for SDK and exposure-processing metadata.
  • Use company_metadata for the event metadata payload you logged.

Common fields in user_object

user_object contains user fields associated with the event. It often includes the same common fields as user_dimensions, plus any additional non-null fields sent on the SDK user object.

Common fields in statsig_metadata

statsig_metadata contains SDK-level and exposure-processing metadata associated with the event. These are some of the most common customer-facing fields:

Other SDK debugging and exposure-processing metadata may also appear in statsig_metadata.

What goes in company_metadata

company_metadata stores the metadata payload logged with the event. This object doesn't have a fixed schema and varies based on the event and your SDK usage. Most event-specific business context, such as price, currency, category, plan, screen, route, or nested objects like cart, items, and context, appears here.

Was this helpful?