> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/mixpanel/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Schemas

> Manage data pipeline schemas and exports

# Data Pipeline Schemas

Configure and manage schematized data exports to warehouses like BigQuery, Snowflake, and more.

## List Pipelines

Get all pipelines configured for a project.

<ParamField query="project_id" type="number" required>
  Your Mixpanel project ID
</ParamField>

### Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://data.mixpanel.com/api/2.0/nessie/pipeline/jobs?project_id=123" \
    -u SERVICE_ACCOUNT_USERNAME:SERVICE_ACCOUNT_SECRET
  ```

  ```python Python theme={null}
  import requests
  from requests.auth import HTTPBasicAuth

  response = requests.get(
      'https://data.mixpanel.com/api/2.0/nessie/pipeline/jobs',
      auth=HTTPBasicAuth('SERVICE_ACCOUNT_USERNAME', 'SERVICE_ACCOUNT_SECRET'),
      params={'project_id': 123}
  )

  pipelines = response.json()
  print(pipelines)
  ```
</CodeGroup>

***

## Create BigQuery Pipeline

Export data to Google BigQuery with automatic schema management.

<ParamField body="project_id" type="number" required>
  Your Mixpanel project ID
</ParamField>

<ParamField body="type" type="string" required>
  Pipeline type: `bigquery`
</ParamField>

<ParamField body="schema_type" type="string">
  Schema organization: `monoschema` (all events in one table) or `multischema` (each event in its own table)

  Default: `monoschema`
</ParamField>

<ParamField body="data_source" type="string">
  What to export: `events` or `people`

  Default: `events`
</ParamField>

<ParamField body="sync" type="boolean">
  Enable automatic sync to update exported data when changes occur

  Default: `true`
</ParamField>

<ParamField body="from_date" type="string" required>
  Start date in `YYYY-MM-DD` format
</ParamField>

<ParamField body="to_date" type="string">
  End date in `YYYY-MM-DD` format (leave empty for continuous export)
</ParamField>

<ParamField body="frequency" type="string">
  Export frequency: `hourly` or `daily`

  Default: `daily`
</ParamField>

<ParamField body="bq_region" type="string" required>
  BigQuery region: `US`, `EU`, `ASIA_EAST_1`, etc.
</ParamField>

<ParamField body="gcp_project" type="string">
  Your GCP project ID (if using your own BigQuery)
</ParamField>

<ParamField body="bq_dataset_name" type="string">
  Dataset name in your BigQuery project
</ParamField>

### Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://data.mixpanel.com/api/2.0/nessie/pipeline/create" \
    -X POST \
    -u SERVICE_ACCOUNT_USERNAME:SERVICE_ACCOUNT_SECRET \
    -H "Content-Type: application/x-www-form-urlencoded" \
    -d "project_id=123" \
    -d "type=bigquery" \
    -d "schema_type=monoschema" \
    -d "data_source=events" \
    -d "sync=true" \
    -d "from_date=2024-01-01" \
    -d "frequency=daily" \
    -d "bq_region=US"
  ```

  ```python Python theme={null}
  import requests
  from requests.auth import HTTPBasicAuth

  response = requests.post(
      'https://data.mixpanel.com/api/2.0/nessie/pipeline/create',
      auth=HTTPBasicAuth('SERVICE_ACCOUNT_USERNAME', 'SERVICE_ACCOUNT_SECRET'),
      data={
          'project_id': 123,
          'type': 'bigquery',
          'schema_type': 'monoschema',
          'data_source': 'events',
          'sync': True,
          'from_date': '2024-01-01',
          'frequency': 'daily',
          'bq_region': 'US'
      }
  )

  result = response.json()
  print(f"Pipeline created: {result['pipeline_names']}")
  ```
</CodeGroup>

***

## Create Snowflake Pipeline

Export data to Snowflake.

<ParamField body="type" type="string" required>
  Pipeline type: `snowflake`
</ParamField>

<ParamField body="snowflake_share_with" type="string" required>
  Snowflake account name to share data with
</ParamField>

<ParamField body="region" type="string" required>
  Snowflake region: `us-west-aws`, `us-east-aws`, `eu-west-1-aws`, etc.
</ParamField>

<ParamField body="snowflake_prefix" type="string">
  Prefix for created views and tables
</ParamField>

### Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://data.mixpanel.com/api/2.0/nessie/pipeline/create" \
    -X POST \
    -u SERVICE_ACCOUNT_USERNAME:SERVICE_ACCOUNT_SECRET \
    -d "project_id=123" \
    -d "type=snowflake" \
    -d "schema_type=monoschema" \
    -d "data_source=events" \
    -d "sync=true" \
    -d "from_date=2024-01-01" \
    -d "snowflake_share_with=mysnowflakeaccount" \
    -d "region=us-west-aws"
  ```
</CodeGroup>

***

## Pause Pipeline

Pause a running pipeline.

<ParamField body="name" type="string" required>
  The pipeline name
</ParamField>

<ParamField body="project_id" type="number">
  Your Mixpanel project ID
</ParamField>

### Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://data.mixpanel.com/api/2.0/nessie/pipeline/pause" \
    -X POST \
    -u SERVICE_ACCOUNT_USERNAME:SERVICE_ACCOUNT_SECRET \
    -d "name=trial-events-daily-bigquery-monoschema" \
    -d "project_id=123"
  ```
</CodeGroup>

***

## Resume Pipeline

Resume a paused pipeline.

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://data.mixpanel.com/api/2.0/nessie/pipeline/resume" \
    -X POST \
    -u SERVICE_ACCOUNT_USERNAME:SERVICE_ACCOUNT_SECRET \
    -d "name=trial-events-daily-bigquery-monoschema" \
    -d "project_id=123"
  ```
</CodeGroup>

***

## Delete Pipeline

Delete a pipeline and optionally its exported data.

<Warning>
  Deleting a pipeline will stop all future exports and may delete historical data.
</Warning>

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://data.mixpanel.com/api/2.0/nessie/pipeline/cancel" \
    -X POST \
    -u SERVICE_ACCOUNT_USERNAME:SERVICE_ACCOUNT_SECRET \
    -d "name=trial-events-daily-bigquery-monoschema" \
    -d "project_id=123"
  ```
</CodeGroup>
