# Warehouse Native Quickstart

Statsig Warehouse Native connects to a table in your warehouse, builds metrics on top of it, and computes experiment results. This quickstart walks through connecting your data, configuring a metric, and reading your first results.

All you need is a table in your warehouse that has metric or event logging data.

## Step 1: Connect your warehouse

Statsig uses your warehouse to store and analyze your experiment data; you have total control and visibility over the data itself. To connect your warehouse, go to your warehouse's setup page.

* [Snowflake](https://docs.statsig.com/statsig-warehouse-native/connecting-your-warehouse/snowflake)
* [Athena](https://docs.statsig.com/statsig-warehouse-native/connecting-your-warehouse/athena)
* [BigQuery](https://docs.statsig.com/statsig-warehouse-native/connecting-your-warehouse/bigquery)
* [Databricks](https://docs.statsig.com/statsig-warehouse-native/connecting-your-warehouse/databricks)
* [Redshift](https://docs.statsig.com/statsig-warehouse-native/connecting-your-warehouse/redshift)

## Step 2: Connect to data

To connect your event or metric data, you create a [Metric Source](https://docs.statsig.com/statsig-warehouse-native/configuration/metric-sources). Go to the *Metric Sources* page and click **Create** to make a new Metric Source.

{% figure %}
![Create metric source button](https://docs.statsig.com/images/statsig-warehouse-native/guides/quick-start/66229d92-99a8-45c6-9a1c-7f8585465338.png)
{% /figure %}

If you have a table, use the `Table` metric source type and put in the path to your table. Otherwise, you can write a query to access or generate some test data.

Press **Analyze** to generate samples from your table, then map required columns (Timestamp and UserID) so Statsig can connect your metric data to your assignment data.

{% figure %}
![Metric source configuration mapping timestamp and user ID](https://docs.statsig.com/images/statsig-warehouse-native/guides/quick-start/c0982d71-71c5-4899-bed9-a72c7db59515.png)
{% /figure %}

Save your changes, and you've connected to your data!

## Step 3: Make a metric

Now that you've connected to data, you can build metrics on top of this data. You can configure metrics programmatically later; for now, go to your *Metrics Catalog* and click **Create** to make a new metric.

{% figure %}
![Metrics catalog create button](https://docs.statsig.com/images/statsig-warehouse-native/guides/quick-start/8b997a0c-22e9-409d-8918-d21a95af1367.png)
{% /figure %}

Point to the metric source you configured, name your metric, and press **Create**. Pressing **Create** takes you to the new metric's page, where you can configure the metric.

To get started, Statsig recommends making a [count metric](https://docs.statsig.com/statsig-warehouse-native/metrics/count). A count metric counts the number of rows in your metric source. A count metric is useful for event logging. For example, you might filter to a "purchase" event to count the number of times users purchased an item.

Select "Count" and save, or pause here to explore the options.

## Step 4: Connect an experiment

Next, you connect to experiment data. If you have a table with exposures you've already logged, use that. Ensure you've logged the same identifier there as you used in your metric source.

Otherwise, you can quickly follow the guide to setting up an [A/A test](https://docs.statsig.com/experiments/types/aa-test), using the same data you used for your exposures. An A/A test should generate a neutral experiment result.

Go to *Assignment Sources* and create a new one.

{% figure %}
![Create assignment source page](https://docs.statsig.com/images/statsig-warehouse-native/guides/quick-start/fe0e4c5d-e2a6-4943-9b09-cb81dbadee9e.png)
{% /figure %}

If using an AA test, follow the instructions to randomly assign users to groups. If you're using existing assignments, write a query to pull the data from your logs and map the unit, group, experiment, and timestamp columns.

{% figure %}
![Assignment source query configuration](https://docs.statsig.com/images/statsig-warehouse-native/guides/quick-start/08e3f20c-1590-4b08-ad60-fa96ecbf15cb.png)
{% /figure %}

Pressing **Save and Scan** saves your new source and detects experiments that exist on the source. The scan takes seconds to a few minutes. After it finishes, scroll down to look through the experiments Statsig found.

{% figure %}
![Detected experiments table](https://docs.statsig.com/images/statsig-warehouse-native/guides/quick-start/8be2f079-4440-4742-9727-08e25b65c84b.png)
{% /figure %}

## Step 5: Analyze your experiment

Press **Create** on your experiment of interest to start creating your experiment.

{% figure %}
![Experiment creation wizard](https://docs.statsig.com/images/statsig-warehouse-native/guides/quick-start/fc6e7092-b621-494a-bedb-8cd03a64d510.png)
{% /figure %}

Add a display name and hypothesis, then press **Create**. Pressing **Create** takes you to the final setup step, where you specify the metrics for your experiment. Choose the metric you created in step 3.

Statsig automatically detects the group split, but if the detected split is incorrect you can manually adjust it to the intended value.

{% figure %}
![Experiment setup selecting metrics and group split](https://docs.statsig.com/images/statsig-warehouse-native/guides/quick-start/287bc60b-23a6-4681-ac26-282ce8b88c13.png)
{% /figure %}

Press **Save and Analyze**, and Statsig starts calculating Pulse Results. You can track the progress in the loading bar at the bottom of the experiment's results page.

## Step 6: Read results

If everything worked, you should see:

* Your hypothesis. The hypothesis lives at the top of the results page to give context and guide interpretation of the results.
* Cumulative exposures. Cumulative exposures show the number of unique units exposed to each group, and the balance between groups.
* Your scorecard. The scorecard shows a summary of the observed differences in metrics between your experiment groups, with access to additional views and raw statistics.

{% figure %}
![Experiment results showing hypothesis and exposures](https://docs.statsig.com/images/statsig-warehouse-native/guides/quick-start/38f4f438-2592-44cb-9063-d3bc97da404b.png)
{% /figure %}

Explore the product and docs to learn more about these features:

* Click into a result's error bar to view raw statistics, timeseries, and projected [timeline impact](https://docs.statsig.com/experiments/statistical-methods/topline-impact).
* Hover over a metric to get detailed context on its inputs and how Statsig calculated the pulse result.
* Go to the **Diagnostics** tab to view the [checks](https://docs.statsig.com/statsig-warehouse-native/features/monitor-an-experiment) Statsig automatically ran to validate your experiment results.
* Select the reloaded timestamp to view the run time and query cost of your Pulse analysis, and the SQL queries used to calculate the results.
* Go to the **Explore** tab to start filtering data, exploring results by dimensions, or running other follow-up analyses.
* Go to the **Summary** tab to start putting together a [report](https://docs.statsig.com/statsig-warehouse-native/features/reports) to share the results of your analysis.
* Start a discussion or add context, either in the **Discussion** tab or with in-context comments on top of the results themselves.

The example experiment wasn't an AA test, and there was an experimental impact. The result is statistically significant, with an estimated lift of +12.89% ±0.93% from control to test. Select the result to view additional details, such as the expected change to the overall topline metric value if the experiment ships.

{% figure %}
![Detailed metric lift view with significance](https://docs.statsig.com/images/statsig-warehouse-native/guides/quick-start/33e5fc2a-9b36-43f9-a6c2-2936867a7980.png)
{% /figure %}

You've completed the Quick Start guide.
