Who can use it
- Your workspace needs the Enterprise plan, and a BigQuery or Snowflake connection. Redshift, Postgres and S3 aren’t supported.
- Owners and admins can turn it on, change the destination and start an export. Turning export off is allowed on any plan. A workspace that leaves Enterprise stops exporting at the next hourly sync.
Set up the destination
- BigQuery
- Snowflake
Create a dataset in the same location as the connection. The default name is
gaintrace. Give the connection’s service account BigQuery Data Editor on that dataset, and keep BigQuery Job User on the project.How the export behaves
- First export. The first run copies every response and campaign. Anyone querying the tables while it runs can see a partial table until it finishes.
- Every hour. After that, export runs with the connection’s sync, every hour. It needs automatic sync to be on for the connection and billing to not be locked. Choose Export now to run it right away. The tab shows the state (Copying existing responses, Exporting, Up to date or Export failed), the last export time and how many responses and campaigns were exported.
- No duplicates. Rows are upserted by
id, so every response and campaign appears once. An edit, a change to a response’s follow-up, or a partial response that the customer later completes updates its row. A row never moves backwards to older data. - Deletions. When a response or campaign is deleted in GainTrace, its row stays with
deleted_atset, and every answer and personal column is cleared. Onlyid,workspace_id,survey_id,measure,updated_atanddeleted_atare kept. - Privacy. Responses to anonymous surveys never carry
person_id,respondent_emailorrespondent_name, and neither do responses whose personal details were removed (anonymized_atis set). Private notes and GainTrace’s internal keys are never exported. - What isn’t included. Answers imported from other tools or from NPS CSV and API history aren’t exported.
- Turn it off. The tables stay in your warehouse. Turning export on again, or changing the dataset or schema, empties the tables and reloads every response. Changing the destination or turning export off while a run is in progress stops that run.
- Catching up. If an export falls about a month behind, the next run reloads everything instead of patching the gap.
Tables
Both tables also have a_gaintrace_synced_at timestamp that GainTrace sets on each write. The column types are STRING, INT64, BOOL, TIMESTAMP and JSON in BigQuery, and VARCHAR, NUMBER(38,0), BOOLEAN, TIMESTAMP_TZ and VARIANT in Snowflake. Ids are STRING in BigQuery and VARCHAR(36) in Snowflake.
survey_responses
answers and question_answers use the same shapes as the survey_response webhook, in snake_case column names.
surveys
Example: monthly NPS
This query counts monthly NPS from the export, using the dataset name from your export. It leaves out deleted and partial responses and joins the campaign name.DATE_TRUNC('MONTH', r.submitted_at) and COUNT_IF(...), and your schema name.
Troubleshooting
The Surveys API and the survey webhooks give you the same fields in real time. Use the warehouse export for bulk analysis and joins.