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

# Create Pipeline

This request creates an export pipeline. The `type` parameter defines the kind of pipeline that is initiated. Note that only 2 recurring and 1 non-recurring events pipelines (**data\_source**: `events`) are allowed per project.

Create API returns the name of the pipeline created. Use the name of the pipeline to check the status of or cancel the pipeline.

> **Important:** For BigQuery pipelines, `gcp_project` and `bq_dataset_name` are **required** fields. Mixpanel-hosted BigQuery is not supported.

> **Important:** For Snowflake pipelines, customer-hosted credentials (`snowflake_account_name`, `snowflake_warehouse`, `snowflake_storage_integration`, `snowflake_user`, `snowflake_password`, `snowflake_role`, `snowflake_database`, `snowflake_schema`) are **required**. Only password-based authentication is supported. Mixpanel-hosted Snowflake is not supported.


## OpenAPI

````yaml openapi/data-pipelines.openapi.yaml POST /nessie/pipeline/create
openapi: 3.0.2
info:
  title: Data Pipelines API
  description: Create and manage a continious pipeline with an external warehouse.
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: 1.0.0
  contact:
    url: https://mixpanel.com/get-support
servers:
  - url: https://{server}.mixpanel.com/api/2.0
    description: Mixpanel's data export server.
    variables:
      server:
        default: data
        enum:
          - data
          - data-eu
          - data-in
        description: |
          The server location to be used:
            * `data` - The default (US) servers used for most projects
            * `data-eu` - EU servers if you are enrolled in EU Data Residency
            * `data-in` - India servers if you are enrolled in India Data Residency
security:
  - ServiceAccount: []
  - ProjectSecret: []
tags:
  - name: Create Pipelines
    description: Operations to add schemas to a project
  - name: Delete Pipelines
    description: Remove a pipeline from a project
  - name: Edit Pipelines
    description: Edit the params for a pipeline from a project
  - name: Pause Pipelines
    description: Pause a running pipeline
  - name: Resume Pipelines
    description: Resume a paused pipeline
  - name: Retrieve Pipelines
    description: Get information about Pipelines
paths:
  /nessie/pipeline/create:
    post:
      tags:
        - Create Pipelines
      summary: Create Pipeline
      operationId: create-warehouse-pipeline
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              oneOf:
                - $ref: '#/components/schemas/RawGCSPipeline'
                - $ref: '#/components/schemas/RawAmazonS3Pipeline'
                - $ref: '#/components/schemas/RawAzurePipeline'
                - $ref: '#/components/schemas/SchematizedBigQueryPipeline'
                - $ref: '#/components/schemas/SchematizedSnowflakePipeline'
                - $ref: '#/components/schemas/SchematizedAWSPipeline'
                - $ref: '#/components/schemas/SchematizedAzurePipeline'
                - $ref: '#/components/schemas/SchematizedGCSPipeline'
              discriminator:
                propertyName: type
                mapping:
                  gcs-raw:
                    $ref: '#/components/schemas/RawGCSPipeline'
                  s3-raw:
                    $ref: '#/components/schemas/RawAmazonS3Pipeline'
                  azure-raw:
                    $ref: '#/components/schemas/RawAzurePipeline'
                  bigquery:
                    $ref: '#/components/schemas/SchematizedBigQueryPipeline'
                  snowflake:
                    $ref: '#/components/schemas/SchematizedSnowflakePipeline'
                  aws:
                    $ref: '#/components/schemas/SchematizedAWSPipeline'
                  azure-blob:
                    $ref: '#/components/schemas/SchematizedAzurePipeline'
                  gcs-schema:
                    $ref: '#/components/schemas/SchematizedGCSPipeline'
      responses:
        '200':
          description: >-
            Returns the name of the pipeline created. Use the name of the
            pipeline to check the status of or cancel the pipeline.
          content:
            application/json:
              examples:
                example:
                  value:
                    pipeline_names:
                      - trial-events-daily-bigquery-monoschema
                      - trial-people-daily-bigquery-monoschema
                    bigquery_dataset_name: >-
                      https://bigquery.cloud.google.com/dataset/mixpanel-prod-1:sample_dataset_name
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    RawGCSPipeline:
      title: Raw GCS Pipeline
      type: object
      properties:
        project_id:
          $ref: '#/components/schemas/ProjectId'
        type:
          type: string
          default: gcs-raw
        trial:
          type: boolean
          default: false
          description: >
            **Default**: `false`


            A trial pipeline will be created if value is true.


            The trial exports all of your events and user data for thirty
            calendar days, starting from one day before the API call was made. A
            trial pipeline has default values for the following parameters:


            **data_source**: `events`

            **from_date**: `<defaults to previous day>`

            **to_date**: `<no value>`

            **frequency**: `daily`

            **events**: `<no value>`
        data_source:
          type: string
          enum:
            - events
          default: events
          description: >
            **Default**: `events`


            **data_source** In this type of pipeline it can only be `events`
            which exports Mixpanel event data.
        from_date:
          type: string
          format: date
          description: >
            The starting date of the export window. It is formatted as
            `YYYY-MM-DD` and cannot be more than six months in the past.


            If **trial** is set to `true` this will default to the previous day;
            otherwise, it is a required parameter.
        to_date:
          type: string
          format: date
          description: >-
            The ending date of the export window. It is formatted as
            `YYYY-MM-DD`. The export will continue indefinitely if **to_date**
            is empty.
        frequency:
          type: string
          default: daily
          enum:
            - daily
            - hourly
          description: >
            **Default**: `daily`


            **frequency** can be either `hourly` or `daily`. `hourly` exports
            the data every hour. `daily` exports the data at midnight (based on
            the projects timezone). **frequency** should only be passed if your
            export window is indefinite.
        events:
          type: string
          description: >
            A whitelist for the event(s) you intend to export. For multiple
            events, you will need to pass in each event name as separate
            `events` parameters like so: `--data 'events=event1' \ --data
            'events=event2'`



            All events in the project will be exported if no events are

            specified.
        where:
          type: string
          description: >-
            A selector expression used to filter by events data, such as event
            properties. Learn more about how to construct event selector
            expressions [here](/reference/segmentation-expressions).
        data_format:
          type: string
          default: json
          enum:
            - json
          description: >
            **Default**: `json`


            The file format of the exported data. **data_format** for this
            pipeline type can be only `json` .
        gcs_bucket:
          type: string
          description: |
            The GCS bucket to export the Mixpanel data to.
        gcs_prefix:
          type: string
          description: |
            The GCS path prefix of the bucket.
        gcs_region:
          type: string
          description: |
            The GCS region for the bucket.
          enum:
            - northamerica-northeast1
            - us-central1
            - us-east1
            - us-east4
            - us-west1
            - us-west2
            - southamerica-east1
            - europe-north1
            - europe-west1
            - europe-west2
            - europe-west3
            - europe-west4
            - europe-west6
            - asia-east1
            - asia-east2
            - asia-northeast1
            - asia-northeast2
            - asia-northeast3
            - asia-south1
            - asia-southeast1
            - australia-southeast1
      required:
        - type
        - from_date
        - gcs_bucket
        - gcs_region
    RawAmazonS3Pipeline:
      title: Raw Amazon S3 Pipeline
      type: object
      properties:
        project_id:
          $ref: '#/components/schemas/ProjectId'
        type:
          type: string
          default: s3-raw
        trial:
          type: boolean
          default: false
          description: >
            **Default**: `false`


            A trial pipeline will be created if value is true.


            The trial exports all of your events and user data for thirty
            calendar days, starting from one day before the API call was made. A
            trial pipeline has default values for the following parameters:


            **data_source**: `events`


            **from_date**: `<defaults to previous day>`

            **to_date**: `<no value>`

            **frequency**: `daily`

            **events**: `<no value>`
        data_source:
          type: string
          enum:
            - events
          default: events
          description: >
            **Default**: `events`


            **data_source** In this type of pipeline it can only be `events`
            which exports Mixpanel event data.
        from_date:
          type: string
          format: date
          description: >
            The starting date of the export window. It is formatted as
            `YYYY-MM-DD` and cannot be more than six months in the past.


            If **trial** is set to `true` this will default to the previous day;
            otherwise, it is a required parameter.
        to_date:
          type: string
          format: date
          description: >-
            The ending date of the export window. It is formatted as
            `YYYY-MM-DD`. The export will continue indefinitely if **to_date**
            is empty.
        frequency:
          type: string
          default: daily
          enum:
            - daily
            - hourly
          description: >
            **Default**: `daily`


            **frequency** can be either `hourly` or `daily`. `hourly` exports
            the data every hour. `daily` exports the data at midnight (based on
            the projects timezone). **frequency** should only be passed if your
            export window is indefinite.
        events:
          type: string
          description: >
            A whitelist for the event(s) you intend to export. For multiple
            events, you will need to pass in each event name as separate
            `events` parameters like so: `--data 'events=event1' \ --data
            'events=event2'`



            All events in the project will be exported if no events are

            specified.
        where:
          type: string
          description: >-
            A selector expression used to filter by events data, such as event
            properties. Learn more about how to construct event selector
            expressions [here](/reference/segmentation-expressions).
        data_format:
          type: string
          default: json
          enum:
            - json
          description: >
            **Default**: `json`


            The file format of the exported data. **data_format** for this
            pipeline type can be only `json` .
        s3_bucket:
          type: string
          description: The S3 bucket to which the data needs to be exported.
        s3_region:
          type: string
          enum:
            - us-east-1
            - us-east-2
            - us-west-1
            - us-west-2
            - ap-northeast-1
            - ap-northeast-2
            - ap-northeast-3
            - ap-southeast-1
            - ap-southeast-2
            - ap-south-1
            - ca-central-1
            - cn-north-1
            - cn-northwest-1
            - eu-central-1
            - eu-north-1
            - eu-west-1
            - eu-west-2
            - eu-west-3
            - sa-east-1
            - me-south-1
          description: The valid S3 region for the bucket.
        s3_role:
          type: string
          description: >-
            There is no default value. AWS Role the writer should assume when
            writing to s3 e.g. arn:aws:iam::<account-id>:role/example-s3-role
        s3_prefix:
          type: string
          description: >-
            There is no default value. The path prefix for the export. e.g.
            example_custom_prefix
        s3_encryption:
          type: string
          default: none
          enum:
            - none
            - aes
            - kms
          description: |
            At rest encryption used by the s3 bucket.
        s3_kms_key_id:
          type: string
          description: >-
            There is no default value. If s3_encryption is set to kms, this can
            specify the custom key id you desire to use.
      required:
        - type
        - from_date
        - s3_bucket
        - s3_region
        - s3_role
    RawAzurePipeline:
      title: Raw Azure Pipeline
      type: object
      properties:
        project_id:
          $ref: '#/components/schemas/ProjectId'
        type:
          type: string
          default: azure-raw
        trial:
          type: boolean
          default: false
          description: >
            **Default**: `false`


            A trial pipeline will be created if value is true.


            The trial exports all of your events and user data for thirty
            calendar days, starting from one day before the API call was made. A
            trial pipeline has default values for the following parameters:


            **data_source**: `events`

            **from_date**: `<defaults to previous day>`

            **to_date**: `<no value>`

            **frequency**: `daily`

            **events**: `<no value>`
        data_source:
          type: string
          enum:
            - events
          default: events
          description: >
            **Default**: `events`


            **data_source** In this type of pipeline it is `events` which
            exports Mixpanel event data.
        from_date:
          type: string
          format: date
          description: >
            The starting date of the export window. It is formatted as
            `YYYY-MM-DD` and cannot be more than six months in the past.


            If **trial** is set to `true` this will default to the previous day;
            otherwise, it is a required parameter.
        to_date:
          type: string
          format: date
          description: >-
            The ending date of the export window. It is formatted as
            `YYYY-MM-DD`. The export will continue indefinitely if **to_date**
            is empty.
        frequency:
          type: string
          default: daily
          enum:
            - daily
            - hourly
          description: >
            **Default**: `daily`


            **frequency** can be either `hourly` or `daily`. `hourly` exports
            the data every hour. `daily` exports the data at midnight (based on
            the projects timezone). **frequency** should only be passed if your
            export window is indefinite.
        events:
          type: string
          description: >
            A whitelist for the event(s) you intend to export. For multiple
            events, you will need to pass in each event name as separate
            `events` parameters like so: `--data 'events=event1' \ --data
            'events=event2'`



            All events in the project will be exported if no events are

            specified.
        where:
          type: string
          description: >-
            A selector expression used to filter by events data, such as event
            properties. Learn more about how to construct event selector
            expressions [here](/reference/segmentation-expressions).
        data_format:
          type: string
          default: json
          enum:
            - json
          description: >
            **Default**: `json`


            The file format of the exported data. **data_format** for this
            pipeline type can be only `json` .
        storage_account:
          type: string
          description: Blob Storage Account where the data will be exported.
        container_name:
          type: string
          description: The Blob Container within the account where data will be exported.
        prefix:
          type: string
          description: A custom prefix for all the data being exported to the container.
        client_id:
          type: string
          description: |
            `clientId` from the Service Principal credentials.
        client_secret:
          type: string
          description: |
            `clientSecret` from the Service Principal credentials.
        tenant_id:
          type: string
          description: >
            `tenantId` from the Service Principal credentials. This is specific
            to the Active Directory instance where the Service Principal
            resides.
      required:
        - type
        - from_date
        - storage_account
        - container_name
        - client_id
        - client_secret
        - tenant_id
    SchematizedBigQueryPipeline:
      title: Schematized BigQuery Pipeline
      type: object
      properties:
        project_id:
          $ref: '#/components/schemas/ProjectId'
        type:
          type: string
          default: bigquery
        trial:
          type: boolean
          default: false
          description: >
            **Default**: `false`


            A trial pipeline will be created if value is true.


            The trial exports all of your events and user data for thirty
            calendar days, starting from one day before the API call was made. A
            trial pipeline has default values for the following parameters:


            **data_source**: `events and people`

            **sync**: `false`

            **from_date**: `<defaults to previous day>`

            **to_date**: `<no value>`

            **frequency**: `daily`

            **events**: `<no value>`
        schema_type:
          type: string
          enum:
            - monoschema
            - multischema
          default: monoschema
          description: >
            **Default**: `monoschema`


            Allowed options are `monoschema` and `multischema`. `monoschema`
            loads all events into a single table. `multischema` loads every
            event into its own dedicated table. All user data is exported as
            `monoschema`. This param is not supported for people data_source.
        data_source:
          type: string
          enum:
            - events
            - people
          default: events
          description: >
            **Default**: `events`


            **data_source** can be either `events` or `people`. `events` exports
            Mixpanel event data. `people` exports Mixpanel user data.
        sync:
          type: boolean
          enum:
            - true
          default: true
          description: >
            A value of `true` updates exported data with any changes that occur
            in your Mixpanel dataset. These changes include deletions, late
            data, and imports that fall into your export window.
        from_date:
          type: string
          format: date
          description: >
            The starting date of the export window. It is formatted as
            `YYYY-MM-DD` and cannot be more than six months in the past.


            If **trial** is set to `true` this will default to the previous day;
            otherwise, it is a required parameter.
        to_date:
          type: string
          format: date
          description: >-
            The ending date of the export window. It is formatted as
            `YYYY-MM-DD`. The export will continue indefinitely if **to_date**
            is empty.
        frequency:
          type: string
          default: daily
          enum:
            - daily
            - hourly
          description: >
            **Default**: `daily`


            **frequency** can be either `hourly` or `daily`. `hourly` exports
            the data every hour. `daily` exports the data at midnight (based on
            the projects timezone). **frequency** should only be passed if your
            export window is indefinite.
        events:
          type: string
          description: >
            A whitelist for the event(s) you intend to export. For multiple
            events, you will need to pass in each event name as separate
            `events` parameters like so: `--data 'events=event1' \ --data
            'events=event2'`



            All events in the project will be exported if no events are

            specified.
        where:
          type: string
          description: >-
            A selector expression used to filter by events data, such as event
            properties. Learn more about how to construct event selector
            expressions [here](/reference/segmentation-expressions). This
            parameter is only valid when **data_source** is `events`.
        bq_region:
          type: string
          enum:
            - US
            - US_CENTRAL_1
            - US_EAST_1
            - US_WEST_1
            - US_WEST_2
            - US_EAST_4
            - NORTH_AMERICA_NORTHEAST_1
            - SOUTH_AMERICA_EAST_1
            - EU
            - EUROPE_NORTH_1
            - EUROPE_WEST_2
            - EUROPE_WEST_3
            - EUROPE_WEST_4
            - EUROPE_WEST_6
            - ASIA_SOUTH_1
            - ASIA_EAST_1
            - ASIA_EAST_2
            - ASIA_NORTHEAST_1
            - ASIA_NORTHEAST_2
            - ASIA_NORTHEAST_3
            - ASIA_SOUTHEAST_1
            - ASIA_SOUTHEAST_2
            - AUSTRALIA_SOUTHEAST_1
          description: The region used for BigQuery.
        bq_prefix:
          type: string
          description: >-
            The table prefix to be added to all the tables exported as part of
            the this pipeline. Only alphanumeric characters and underscores can
            be used.
        gcp_project:
          type: string
          description: Customer's GCP project ID where the BigQuery dataset is present.
        bq_dataset_name:
          type: string
          description: >-
            Dataset created by the customer on their GCP project to which
            Mixpanel exports data.
      required:
        - type
        - from_date
        - bq_region
        - sync
        - schema_type
        - gcp_project
        - bq_dataset_name
    SchematizedSnowflakePipeline:
      title: Schematized Snowflake Pipeline
      type: object
      properties:
        project_id:
          $ref: '#/components/schemas/ProjectId'
        type:
          type: string
          default: snowflake
        trial:
          type: boolean
          default: false
          description: >
            **Default**: `false`


            A trial pipeline will be created if value is true.


            The trial exports all of your events and user data for thirty
            calendar days, starting from one day before the API call was made. A
            trial pipeline has default values for the following parameters:


            **data_source**: `events and people`

            **sync**: `false`

            **from_date**: `<defaults to previous day>`

            **to_date**: `<no value>`

            **frequency**: `daily`

            **events**: `<no value>`
        schema_type:
          type: string
          enum:
            - monoschema
            - multischema
          default: monoschema
          description: >
            **Default**: `monoschema`


            Allowed options are `monoschema` and `multischema`. `monoschema`
            loads all events into a single table. `multischema` loads every
            event into its own dedicated table. All user data is exported as
            `monoschema`. This param is not supported for people data_source.
        data_source:
          type: string
          enum:
            - events
            - people
          default: events
          description: >
            **Default**: `events`


            **data_source** can be either `events` or `people`. `events` exports
            Mixpanel event data. `people` exports Mixpanel user data.
        sync:
          type: boolean
          enum:
            - true
          default: true
          description: >
            A value of `true` updates exported data with any changes that occur
            in your Mixpanel dataset. These changes include deletions, late
            data, and imports that fall into your export window.
        from_date:
          type: string
          format: date
          description: >
            The starting date of the export window. It is formatted as
            `YYYY-MM-DD` and cannot be more than six months in the past.


            If **trial** is set to `true` this will default to the previous day;
            otherwise, it is a required parameter.
        to_date:
          type: string
          format: date
          description: >-
            The ending date of the export window. It is formatted as
            `YYYY-MM-DD`. The export will continue indefinitely if **to_date**
            is empty.
        frequency:
          type: string
          default: daily
          enum:
            - daily
            - hourly
          description: >
            **Default**: `daily`


            **frequency** can be either `hourly` or `daily`. `hourly` exports
            the data every hour. `daily` exports the data at midnight (based on
            the projects timezone). **frequency** should only be passed if your
            export window is indefinite.
        events:
          type: string
          description: >
            A whitelist for the event(s) you intend to export. For multiple
            events, you will need to pass in each event name as separate
            `events` parameters like so: `--data 'events=event1' \ --data
            'events=event2'`



            All events in the project will be exported if no events are

            specified.
        where:
          type: string
          description: >-
            A selector expression used to filter by events data, such as event
            properties. Learn more about how to construct event selector
            expressions [here](/reference/segmentation-expressions). This
            parameter is only valid when **data_source** is `events`.
        snowflake_prefix:
          type: string
          description: Prefix for created views and tables.
        snowflake_account_name:
          type: string
          description: The Snowflake account identifier (e.g. myorg-myaccount).
        snowflake_warehouse:
          type: string
          description: The Snowflake warehouse to use for loading data.
        snowflake_storage_integration:
          type: string
          description: The name of the Snowflake storage integration for GCS staging.
        snowflake_user:
          type: string
          description: The Snowflake user for authentication.
        snowflake_password:
          type: string
          description: The password for the Snowflake user.
        snowflake_role:
          type: string
          description: The Snowflake role to use.
        snowflake_database:
          type: string
          description: The Snowflake database to export data into.
        snowflake_schema:
          type: string
          description: The Snowflake schema to export data into.
      required:
        - type
        - from_date
        - sync
        - schema_type
        - snowflake_account_name
        - snowflake_warehouse
        - snowflake_storage_integration
        - snowflake_user
        - snowflake_password
        - snowflake_role
        - snowflake_database
        - snowflake_schema
    SchematizedAWSPipeline:
      title: Schematized AWS Pipeline
      type: object
      properties:
        project_id:
          $ref: '#/components/schemas/ProjectId'
        type:
          type: string
          default: aws
        trial:
          type: boolean
          default: false
          description: >
            **Default**: `false`


            A trial pipeline will be created if value is true.


            The trial exports all of your events and user data for thirty
            calendar days, starting from one day before the API call was made. A
            trial pipeline has default values for the following parameters:


            **data_source**: `events and people`

            **sync**: `false`

            **from_date**: `<defaults to previous day>`

            **to_date**: `<no value>`

            **frequency**: `daily`

            **events**: `<no value>`
        schema_type:
          type: string
          enum:
            - monoschema
            - multischema
          default: monoschema
          description: >
            **Default**: `monoschema`


            Allowed options are `monoschema` and `multischema`. `monoschema`
            loads all events into a single table. `multischema` loads every
            event into its own dedicated table. All user data is exported as
            `monoschema`. This param is not supported for people data_source.
        data_source:
          type: string
          enum:
            - events
            - people
          default: events
          description: >
            **Default**: `events`


            **data_source** can be either `events` or `people`. `events` exports
            Mixpanel event data. `people` exports Mixpanel user data.
        sync:
          type: boolean
          enum:
            - true
          default: true
          description: >
            A value of `true` updates exported data with any changes that occur
            in your Mixpanel dataset. These changes include deletions, late
            data, and imports that fall into your export window.
        from_date:
          type: string
          format: date
          description: >
            The starting date of the export window. It is formatted as
            `YYYY-MM-DD` and cannot be more than six months in the past.


            If **trial** is set to `true` this will default to the previous day;
            otherwise, it is a required parameter.
        to_date:
          type: string
          format: date
          description: >-
            The ending date of the export window. It is formatted as
            `YYYY-MM-DD`. The export will continue indefinitely if **to_date**
            is empty.
        frequency:
          type: string
          default: daily
          enum:
            - daily
            - hourly
          description: >
            **Default**: `daily`


            **frequency** can be either `hourly` or `daily`. `hourly` exports
            the data every hour. `daily` exports the data at midnight (based on
            the projects timezone). **frequency** should only be passed if your
            export window is indefinite.
        events:
          type: string
          description: >
            A whitelist for the event(s) you intend to export. For multiple
            events, you will need to pass in each event name as separate
            `events` parameters like so: `--data 'events=event1' \ --data
            'events=event2'`



            All events in the project will be exported if no events are

            specified.
        where:
          type: string
          description: >-
            A selector expression used to filter by events data, such as event
            properties. Learn more about how to construct event selector
            expressions [here](/reference/segmentation-expressions). This
            parameter is only valid when **data_source** is `events`.
        data_format:
          type: string
          default: json
          enum:
            - json
            - parquet
          description: >
            **Default**: `json`


            The file format of the exported data. **data_format** can be either
            `json` or `parquet`.
        s3_bucket:
          type: string
          description: The S3 bucket to which the data needs to be exported.
        s3_region:
          type: string
          enum:
            - us-east-1
            - us-east-2
            - us-west-1
            - us-west-2
            - ap-northeast-1
            - ap-northeast-2
            - ap-northeast-3
            - ap-southeast-1
            - ap-southeast-2
            - ap-south-1
            - ca-central-1
            - cn-north-1
            - cn-northwest-1
            - eu-central-1
            - eu-north-1
            - eu-west-1
            - eu-west-2
            - eu-west-3
            - sa-east-1
          description: The valid S3 region for the bucket.
        s3_role:
          type: string
          description: >-
            There is no default value. AWS Role the writer should assume when
            writing to s3 e.g. arn:aws:iam::<account-id>:role/example-s3-role.
        s3_prefix:
          type: string
          description: There is no default value. The path prefix for the export.
        s3_encryption:
          type: string
          default: none
          enum:
            - none
            - aes
            - kms
          description: |
            At rest encryption used by the s3 bucket.
        s3_kms_key_id:
          type: string
          description: >-
            There is no default value. If s3_encryption is set to kms, this can
            specify the custom key id you desire to use.
        use_glue:
          type: boolean
          default: false
          description: |
            **Default**: `false`

            Use glue schema export.
        glue_database:
          type: string
          description: |
            Required if **use_glue** is `true`.

            The glue database to which the schema needs to be exported.
        glue_role:
          type: string
          description: >
            Required if **use_glue** is `true`. e.g.
            arn:aws:iam::<account-id>:role/example-glue-role


            There is no default value. The role that needs to be assumed for
            updating glue.
        glue_table_prefix:
          type: string
          description: >-
            There is no default value. Prefix to add to table names when
            creating them.
      required:
        - type
        - from_date
        - s3_bucket
        - s3_region
        - s3_role
        - sync
        - schema_type
    SchematizedAzurePipeline:
      title: Schematized Azure Pipeline
      type: object
      properties:
        project_id:
          $ref: '#/components/schemas/ProjectId'
        type:
          type: string
          default: azure-blob
        trial:
          type: boolean
          default: false
          description: >
            **Default**: `false`


            A trial pipeline will be created if value is true.


            The trial exports all of your events and user data for thirty
            calendar days, starting from one day before the API call was made. A
            trial pipeline has default values for the following parameters:


            **data_source**: `events and people`

            **sync**: `false`

            **from_date**: `<defaults to previous day>`

            **to_date**: `<no value>`

            **frequency**: `daily`

            **events**: `<no value>`
        schema_type:
          type: string
          enum:
            - monoschema
            - multischema
          default: monoschema
          description: >
            **Default**: `monoschema`


            Allowed options are `monoschema` and `multischema`. `monoschema`
            loads all events into a single table. `multischema` loads every
            event into its own dedicated table. All user data is exported as
            `monoschema`. This param is not supported for people data_source.
        data_source:
          type: string
          enum:
            - events
            - people
          default: events
          description: >
            **Default**: `events`


            **data_source** can be either `events` or `people`. `events` exports
            Mixpanel event data. `people` exports Mixpanel user data.
        sync:
          type: boolean
          enum:
            - true
          default: true
          description: >
            A value of `true` updates exported data with any changes that occur
            in your Mixpanel dataset. These changes include deletions, late
            data, and imports that fall into your export window.
        from_date:
          type: string
          format: date
          description: >
            The starting date of the export window. It is formatted as
            `YYYY-MM-DD` and cannot be more than six months in the past.


            If **trial** is set to `true` this will default to the previous day;
            otherwise, it is a required parameter.
        to_date:
          type: string
          format: date
          description: >-
            The ending date of the export window. It is formatted as
            `YYYY-MM-DD`. The export will continue indefinitely if **to_date**
            is empty.
        frequency:
          type: string
          default: daily
          enum:
            - daily
            - hourly
          description: >
            **Default**: `daily`


            **frequency** can be either `hourly` or `daily`. `hourly` exports
            the data every hour. `daily` exports the data at midnight (based on
            the projects timezone). **frequency** should only be passed if your
            export window is indefinite.
        events:
          type: string
          description: >
            A whitelist for the event(s) you intend to export. For multiple
            events, you will need to pass in each event name as separate
            `events` parameters like so: `--data 'events=event1' \ --data
            'events=event2'`



            All events in the project will be exported if no events are

            specified.
        where:
          type: string
          description: >-
            A selector expression used to filter by events data, such as event
            properties. Learn more about how to construct event selector
            expressions [here](/reference/segmentation-expressions). This
            parameter is only valid when **data_source** is `events`.
        data_format:
          type: string
          default: json
          enum:
            - json
            - parquet
          description: >
            **Default**: `json`


            The file format of the exported data. **data_format** can be either
            `json` or `parquet`.
        storage_account:
          type: string
          description: Blob Storage Account where the data will be exported.
        container_name:
          type: string
          description: The Blob Container within the account where data will be exported.
        prefix:
          type: string
          description: A custom prefix for all the data being exported to the container.
        client_id:
          type: string
          description: |
            `clientId` from the Service Principal credentials.
        client_secret:
          type: string
          description: |
            `clientSecret` from the Service Principal credentials.
        tenant_id:
          type: string
          description: >
            `tenantId` from the Service Principal credentials. This is specific
            to the Active Directory instance where the Service Principal
            resides.
      required:
        - type
        - from_date
        - storage_account
        - container_name
        - client_id
        - client_secret
        - tenant_id
        - sync
        - schema_type
    SchematizedGCSPipeline:
      title: Schematized GCS Pipeline
      type: object
      properties:
        project_id:
          $ref: '#/components/schemas/ProjectId'
        type:
          type: string
          default: gcs-schema
        trial:
          type: boolean
          default: false
          description: >
            **Default**: `false` A trial pipeline will be created if value is
            true. The trial exports all of your events and user data for thirty
            calendar days, starting from one day before the API call was made. A
            trial pipeline has default values for the following parameters:
            **data_source**: `events and people` **sync**: `false`
            **from_date**: `<defaults to previous day>` **to_date**: `<no
            value>` **frequency**: `daily` **events**: `<no value>`
        schema_type:
          type: string
          enum:
            - monoschema
            - multischema
          default: monoschema
          description: >
            **Default**: `monoschema` Allowed options are `monoschema` and
            `multischema`. `monoschema` loads all events into a single table.
            `multischema` loads every event into its own dedicated table. All
            user data is exported as `monoschema`. This param is not supported
            for people data_source.
        data_source:
          type: string
          enum:
            - events
            - people
          default: events
          description: >
            **Default**: `events` **data_source** can be either `events` or
            `people`. `events` exports Mixpanel event data. `people` exports
            Mixpanel user data.
        sync:
          type: boolean
          enum:
            - true
          default: true
          description: >
            A value of `true` updates exported data with any changes that occur
            in your Mixpanel dataset. These changes include deletions, late
            data, and imports that fall into your export window.
        from_date:
          type: string
          format: date
          description: >
            The starting date of the export window. It is formatted as
            `YYYY-MM-DD` and cannot be more than six months in the past.


            If **trial** is set to `true` this will default to the previous day;
            otherwise, it is a required parameter.
        to_date:
          type: string
          format: date
          description: >-
            The ending date of the export window. It is formatted as
            `YYYY-MM-DD`. The export will continue indefinitely if **to_date**
            is empty.
        frequency:
          type: string
          default: daily
          enum:
            - daily
            - hourly
          description: >
            **Default**: `daily` **frequency** can be either `hourly` or
            `daily`. `hourly` exports the data every hour. `daily` exports the
            data at midnight (based on the projects timezone). **frequency**
            should only be passed if your export window is indefinite.
        events:
          type: string
          description: >
            A whitelist for the event(s) you intend to export. For multiple
            events, you will need to pass in each event name as separate
            `events` parameters like so: `--data 'events=event1' \ --data
            'events=event2'`


            All events in the project will be exported if no events are

            specified.
        where:
          type: string
          description: >-
            A selector expression used to filter by events data, such as event
            properties. Learn more about how to construct event selector
            expressions [here](/reference/segmentation-expressions). This
            parameter is only valid when **data_source** is `events`.
        data_format:
          type: string
          default: json
          enum:
            - json
            - parquet
          description: >
            **Default**: `json` The file format of the exported data.
            **data_format** can be either `json` or `parquet`.
        gcs_bucket:
          type: string
          description: |
            *Required if **type** is `gcs-schema`
            The GCS bucket to export the Mixpanel data to.
        gcs_prefix:
          type: string
          description: |
            *Required if **type** is `gcs-schema`
            The GCS path prefix of the bucket.
        gcs_region:
          type: string
          description: |
            *Required if **type** is `gcs-schema`
            The GCS region for the bucket.
          enum:
            - northamerica-northeast1
            - us-central1
            - us-east1
            - us-east4
            - us-west1
            - us-west2
            - southamerica-east1
            - europe-north1
            - europe-west1
            - europe-west2
            - europe-west3
            - europe-west4
            - europe-west6
            - asia-east1
            - asia-east2
            - asia-northeast1
            - asia-northeast2
            - asia-northeast3
            - asia-south1
            - asia-southeast1
            - australia-southeast1
      required:
        - type
        - from_date
        - gcs_bucket
        - gcs_region
        - sync
        - schema_type
    ProjectId:
      type: number
      description: >-
        Your project id (must be specified when using service account based
        authentication)
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        status:
          type: string
          enum:
            - error
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ServiceAccount:
      type: http
      scheme: basic
      description: Service Account
    ProjectSecret:
      type: http
      scheme: basic
      description: Project Secret

````