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

# Event Connectors

> Export event data ingested through the Confidence event sender SDKs.

export const HowToSchema = ({name, description, steps = []}) => {
  const schema = {
    "@context": "https://schema.org",
    "@type": "HowTo",
    name,
    description
  };
  if (steps.length > 0) {
    schema.step = steps.map((s, i) => ({
      "@type": "HowToStep",
      position: i + 1,
      name: typeof s === "string" ? s : s.name,
      text: typeof s === "string" ? s : s.text || s.name
    }));
  }
  return <script type="application/ld+json" dangerouslySetInnerHTML={{
    __html: JSON.stringify(schema)
  }} />;
};

<HowToSchema name="Event Connectors" description="Export event data ingested through the Confidence event sender SDKs." />

Event connectors export event data ingested through the Confidence event sender SDKs.

<Tabs>
  <Tab title="BigQuery">
    Export events to BigQuery. The connector writes each event type to a separate table in the configured dataset with an optional prefix.

    ### Required GCP Roles

    * BigQuery data owner for the destination dataset.

    ### Configuration

    * **Project** - The GCP project the destination table exists in
    * **Service account** - A GCP service account that has write access to the destination table. Configure the service account so that the Confidence service account can impersonate it.
    * **Dataset** - The dataset in which to create the destination tables
    * **Table prefix** - An optional prefix to use for the tables created by this connector
  </Tab>

  <Tab title="Redshift">
    Export events to tables in Redshift, by first writing the data as Parquet files to an S3 bucket, and then importing these files into Redshift tables, one per event type.

    ### Required AWS Permissions/Policies for Role

    * `s3:GetObject`
    * `s3:GetObjectAcl`
    * `s3:PutObject`
    * `s3:PutObjectAcl`
    * `AmazonRedshiftDataFullAccess` policy
    * `AmazonRedshiftAllCommandsFullAccess` policy

    The role also needs to have permissions to create tables and insert rows into those tables in the configured database.

    ### Configuration

    * **Table Prefix** - A prefix to use for all tables created by the connector. The connector loads each event type into its own table.
    * **Cluster** - The name of the Redshift cluster to use.
    * **Database** - The name of the Redshift database to use.
    * **Schema** - The name of the Redshift schema in which the connector creates the table.
    * **Redshift region** - The AWS region of the cluster. Because of AWS limitations, the region of the cluster needs to match the region of the S3 bucket.
    * **Redshift Role ARN** - The role the Redshift `COPY` jobs use. This role needs to have permission to create tables and copy data into tables in the configured schema, and load files from the S3 bucket.
    * **Bucket** - The S3 bucket to write the Parquet files to.
    * **Bucket Role ARN** - The role Confidence has when writing files to the S3 bucket.
    * **Bucket Region** - The AWS region of the bucket. The bucket needs to be in the same region as the Redshift cluster.
    * **Batch settings** - These settings control the size and max age of the Parquet files written to S3.
  </Tab>

  <Tab title="Databricks">
    Export events to Databricks tables. Confidence writes Parquet files to the selected staging provider and then loads them into Databricks tables, typically one table per event type.

    ### Prerequisites

    Before configuring this connector, follow the [Databricks setup guide](/docs/start/warehouse-native/databricks). It walks you through creating or reusing a Databricks service principal and SQL warehouse, granting the warehouse and Unity Catalog permissions that Confidence needs, and configuring S3 or ADLS Gen2 staging in your cloud account.

    ### Configuration

    * **Schema** - The fully qualified Unity Catalog schema, such as `main.confidence`.
    * **Host** - The Databricks workspace URL, including `https://`, for example `https://1234567890123456.7.gcp.databricks.com`.
    * **Warehouse ID** - The ID of the SQL warehouse that runs the load statements.
    * **Client ID** - The Databricks service principal application ID, also called the OAuth client ID.
    * **Client Secret** - The OAuth secret generated for the Databricks service principal.
    * **Staging provider** - Select **AWS - S3** or **Azure - ADLS Gen2**, then enter the provider-specific settings.
    * **Batch settings** - These settings control the size of the Parquet files written to staging. If not set or 0, Confidence uses the default settings.

    Select **Validate** before continuing. Confidence checks storage access, Databricks access, table creation, and a test load.
  </Tab>
</Tabs>
