If your BigQuery export is failing (or you are not sure whether you set it up correctly), this guide walks you through the prerequisites, explains how Power My Analytics creates your tables and schema for you, and shows you how to resolve the most common export errors, including the "Code 500" error. Work through the sections in order, or jump to the error message you are seeing.
Start Here: Check Your Export Logs
Almost every BigQuery export problem can be diagnosed from the export log, so this is the best first step.
- In your hub, go to Exports > BigQuery.
- Find the row for your export and click View Logs (the paper icon).
- Read the most recent entry under Information. The message text usually names the cause (for example, a permission problem, a billing problem, or a row-limit problem).
Once you know the message, use the matching section below.
Before You Start: BigQuery Export Prerequisites
Most "I set everything up but it still errors" cases come down to one of these prerequisites not being met. Confirm all of them before troubleshooting further:
- Your plan includes data exports. Data exports are available on the Custom plan when your agreement includes them (legacy Exports add-on subscribers retain their existing access). If you are unsure, contact our sales team.
- BigQuery billing is enabled. Your BigQuery project must be linked to an active Cloud Billing account. PMA uses streaming inserts, which are not supported on BigQuery's free tier.
- A dataset already exists in BigQuery. You create the dataset; PMA does not create it for you (see the next section).
- Your Google account has the right roles and scopes. See the Permissions and Access Checklist below.
- Your Data Builder report includes at least one date field. Without a date field, a BigQuery export cannot complete.
Do I Need to Create the Table or Define Its Schema First?
No. This is the single most common point of confusion, so it is worth being clear:
- You create the dataset. A dataset must exist in BigQuery before you create the export, and your Google account must have Write permission on it.
- PMA creates the table and its schema for you. You do not need to pre-create the destination table, and you do not need to define any columns or field types at the table level. When the export runs, PMA generates the table automatically and writes the schema based on the fields in your Data Builder report.
You do not need to pre-create the table. When you set up the export, you simply type the table name you want PMA to use. If a table by that name does not exist yet, PMA creates it on the first run; you do not build the columns yourself. Manually creating an empty table beforehand is unnecessary and will not fix a failing export, because the cause is almost always the report or a permission, not a missing table.
How PMA writes to your table on each run
- On every run, PMA first deletes any existing export data in BigQuery that falls within the date range of your export, then creates and populates the table(s) for that range with the current data.
- The destination table name matches your Data Builder report name, with spaces replaced by underscores (
_). - Exports are partitioned by date: exports spanning less than 90 days are partitioned by day, and exports spanning 90 days or more are partitioned by month. Partitions are visible in the Google Cloud console under the Filter dropdown next to the table name.
For the full setup walkthrough, see How to Export to BigQuery.
Permissions and Access Checklist
A successful BigQuery connection requires the Google account you use as the destination to have the right roles, dataset access, and permissions granted to PMA. Confirm each item:
Power My Analytics will never edit, create, or delete anything in your BigQuery dataset or Google account without your specific approval. Google does not offer a read-only option for these permissions.
Common BigQuery Export Errors and How to Fix Them
Code 500 or 502: "Could Not Handle the Request"
This is the error behind most "I followed all the steps and it still fails" reports, and it is usually not a problem with your table or schema setup. A Code 500 (or 502) almost always means PMA could not complete the export because the underlying Data Builder report is too large or too complex to process in a single run, so it exceeds BigQuery's limits or times out before finishing.
Common triggers include a report that returns too many rows, a very long date range, too many fields in one report, a high-cardinality dimension (a field with a very large number of unique values), or heavy use of live fields.
To resolve it:
- Check the row count. For connectors other than Facebook Ads and GA4, make sure the report returns fewer than 40,000 rows. (This row limit does not apply to Facebook Ads or GA4.)
- Split the export by time period. Instead of one long date range, run the export in smaller segments (for example, month by month or one quarter at a time), each pointed at its own table. This is often the fastest fix when a specific dimension makes the report large.
- Reduce live fields. Remove fields marked with the lightning bolt icon (⚡) in the Schema Explorer where you do not need real-time values, since each live field triggers a real-time API call.
- Limit fields per report. Group related fields into separate, smaller reports (for example, one report for order metrics and another for customer metrics).
If one important dimension is what pushes the report over the limit, you do not have to drop it. Keep the dimension and export in smaller time slices instead (for example, a separate monthly export per table). If you later want a single combined view, you can join the monthly tables together with a UNION view in BigQuery.
For more detail, see BigQuery Export Limitations and BigQuery Error: Could Not Handle the Request, Error Code 500 or 502.
The Export Runs a Long Time, Then Fails ("Timeout" or "Failed to Fetch")
Timeout and "Failed to Fetch" errors have the same root cause as Code 500: too much data requested at once. A healthy export should complete in under 10 minutes. If an export runs for 30 minutes or more, it has hung and should be cancelled: click Edit Export, make no changes, and click Update to stop it. Then apply the size-reduction steps above (split by time period, reduce live fields, limit fields per report).
Code 403: "Access Denied"
This error has two variations:
- "Streaming insert is not allowed in the free tier." Your BigQuery project is on the free tier, which does not support PMA exports. Upgrade your BigQuery plan (Google prices streaming inserts at about $0.01 USD per 200MB; see Google's BigQuery data ingestion pricing).
- "Permission denied on dataset (or it may not exist)." The Google account does not have write access to the dataset. Have your BigQuery admin grant write permission on the destination dataset.
See BigQuery Error: Code 403; Message: Access Denied.
"Billing Has Not Been Enabled for This Project"
Your BigQuery project is not linked to an active Cloud Billing account. Link the project to a valid billing account, then wait up to 24 hours for it to become active before re-running your export. Full steps are in BigQuery Error: Billing Has Not Been Enabled for This Project.
"Missing BigQuery Scopes"
The Google account connected as your destination is missing one or both of the BigQuery permissions PMA needs. Reconnect the account from the export configuration screen (Exports > BigQuery > Create Export or Edit Export > Destination, then the blue + button) and grant both scopes at Google's prompt. Full steps are in Error: Missing BigQuery Scopes.
BigQuery is a destination, not a data source, so you will not find it under Sources. You reauthorize your Google account directly in the export configuration.
"The Owner of the Report Has Left the Organization"
This appears when the Data Builder report being exported is owned by a user who is no longer part of your hub. Please contact our support team so we can reassign the report owner in your hub; the error will stop once that is done.
Still Not Working? General Troubleshooting Steps
If none of the above resolves the issue, work through these in order:
- Re-read the export log (Exports > BigQuery > View Logs) for the exact error message.
- Verify your Data Builder report contains at least one date field and returns fewer than 40,000 rows (for non-Facebook Ads/GA4 connectors).
- Confirm your destination: the dataset exists, the table name is entered correctly, and your Google account has write access to the dataset.
- Confirm PMA has both BigQuery scopes and that billing is enabled on the project.
- Confirm your plan still includes exports if you recently changed plans.
If you still need help, please contact our support team and include the exact error message from your export log and a link to the report you are exporting.
Related Articles