SQL Mirror Onboarding

Last updated: November 19, 2025

Status: Note that Switchboard’s SQL Mirror is currently in Beta. We’re continuing to make improvements to the data available in it, and would love your feedback at support@oneswitchboard.com

Looking to understand available fields and data in the SQL Mirror? Check out our Data Documentation

How to set up a SQL Mirror

Switchboard’s SQL Mirror is set up on Google BigQuery, and so will require a Google Cloud Platform account to access.

Steps

  1. Please reach out to support@oneswitchboard.com and provide us with a list of Google Cloud Platform principals (account emails) that you’d like us to grant access to.

    1. Ideally, this is a GCP Service Account email address used by your team or BI tool, and will likely look something like:

      my-service-account@my-gcp-project-name.iam.gserviceaccount.com

      This will make sure your integration is not tied to personal emails. If you normally do not use Google Cloud, or need help creating a Service Account, let us know!

    2. We can also add any other Google accounts that you would like to be able to access the data directly, such as the individual Google accounts for members of your team doing analytics. Alternatively, you can make a Google Group that we can grant access to the mirror, so that you can add/remove individual emails and users at your leisure!

  2. Once setup is complete, our team will reach out and provide you with the dataset name for your organization’s mirror (this is BigQuery’s equivalent of a relational database schema).

    1. Configuration details:

      1. GCP Project Name: switchboard-mirror

      2. GCP BigQuery Region: US

      3. dataset name: (we will provide this on setup. usually same as the org name in Switchboard, e.g. barbie_for_president)

  3. Start querying using your preferred BigQuery SQL interface!

    1. The easiest method is via the BigQuery Console in GCP. Try querying one of the tables, substituting your {{dataset_name}} with the one provided by Switchboard

      select *
      from `switchboard-mirror`.{{dataset_name}}.broadcasts
      limit 10

      How To: Adding switchboard-mirror to the BigQuery dataset explorer panel

      • If you’d like to add the dataset to your Explorer panel in the BigQuery Console so you can view available tables and columns, click “Add”:

        Screenshot 2025-01-31 at 3.16.17 PM.png

        Then select “Star a project by name”

        Screenshot 2025-01-31 at 3.19.40 PM.png

        Type in switchboard-mirror for the Project name, and hit “STAR”

        Screenshot 2025-01-31 at 3.20.02 PM.png

        You should then see the switchboard-mirror project in the dataset explorer! If it doesn’t immediately show up, try refreshing the page.

    2. Note that if you manage multiple different organizations in Switchboard, each organization’s data will appear in a separate dataset in the mirror.

FAQ

Q: How frequently are the tables in my SQL mirror updated?

The tables are refreshed hourly.

Q: I’m using Civis Platform for Analytics, and would like to ingest from Switchboard’s SQL Mirror into Civis. How do I set that up?

First, let us know that you are using Civis! In particular, if you need help creating a GCP service account, we can help provide you one that will have the correct access and permissions for the Civis integration.

Then inside Civis itself...

  1. Create a new remote host in Civis for this BigQuery integration, named something like “Switchboard SQL Mirror”

    1. Make sure to use the “BigQuery Connection” type

    2. The project name for the connection URL is switchboard-mirror

  2. Add a new Database Credential in Civis for the connection

    1. There are instructions for both BigQuery OAuth Credentials and BigQuery Service Account Credentials. We are going to use service accounts.

    2. Name: Switchboard Service Acct Cred

    3. Type: “Database”

    4. Username: the email address of the service account

    5. Password: the full JSON blob for the service account, including the braces { }

    6. Select the remote host created in step 2

    7. Set “Default” to “True”

At this point you should be able to query the data with that remote host and credential. Most likely what you’ll want to do is set up a Database Import to bring the data into your main Civis database. To do that:

  1. Create a new schema in your Civis database for where you want the Switchboard data to live.

    1. If you manage multiple orgs in Switchboard, each org’s data will be in its own dataset in the SQL mirror. It’s up to you how you want to manage that in Civis, but one recommendation is to create a new schema for each dataset.

    2. For example, in Switchboard’s SQL mirror, let’s say the schema is barbie_for_president with tables broadcasts, phone_messages, etc.

      In Civis, you may want to create a new schema switchboard_barbie_for_president and then put the tables broadcasts, phone_messages, etc in there.

      And then if there’s a second dataset ken_for_senate, you can create a new schema in Civis switchboard_ken_for_senate and put those tables in there.

      Alternatively you can create one new schema switchboard, and then prefix your tables in that schema like barbie_for_president_broadcasts, barbie_for_president_phone_messages, ken_for_senate_broadcasts, ken_for_senate_phone_messages, etc

  2. Set up the Database Import jobs

    1. On the top navigation menu, click Data, and then under Imports, select "Database.”

    2. Select the new Remote Host you created as your source (e.g. “Switchboard SQL Mirror”)

    3. For the schema name, that is dataset name that we’ll provide you with, e.g. barbie_for_president.

    4. For the tables available under each schema, see the list of tables above!

    5. Specify the name of the destination schema and table for where you’d like the data to land in your Civis database.

    6. In order to make these imports efficient, there are Advanced Settings you might want to set on each table import.

      1. For larger tables (such as phone_messages), it might be more efficient to not do a full refresh on every run, and instead sync incrementally. You can set “Full Refresh on Each Run” to No. And then most tables have a primary key (id) and a Last Modified Column modified_at . There are a few exceptions:

        1. Append only tables: actblue_donations and phone_message_actions are append-only, and you can configure their incremental syncs using these columns as the “Last Modified Column”: actblue_donations.paid_at and phone_message_actions.created_at and don’t set a Primary Key.

        2. Different primary key: phone_messages currently has a primary key called unique_key, not id. We will be adding an id column soon as well, for simplicity.

  3. If you’re managing multiple organizations on Switchboard, so you have multiple datasets that you need to import, one option is to create a Database Import job for one of the datasets, and then Duplicate it. Then you can just update the schema name in the import job, but keep all of the other settings

Q: The mirror is missing data that I need for my program. How can I request additional columns or tables be added?

Please reach out to support@oneswitchboard.com with your requests! Please provide as much context as you can about your use case for the data, it will help us make more useful improvements.