BigQuery
Connect Google BigQuery to Moselle with a read-only service account. Step-by-step setup in the Google Cloud console or gcloud, then send the key securely from Moselle — about 15 minutes.
What this connection does
Moselle syncs the tables you choose from your BigQuery project into Moselle so forecasts, replenishment plans, and reports stay current — no exports. The connection is read-only: the service account can only read the datasets you grant, and Moselle can never write to your project.
BigQuery is an assisted integration: you create the service account and send its key securely, and the Moselle team handles the connection, data checks, and table mapping with you.
What you'll need
Some organizations block service account key creation with an organization policy (iam.disableServiceAccountKeyCreation). If key creation fails in step 3, ask your Google Cloud org admin for an exception on this project, or contact us and we'll work through an alternative.
Set it up
Create a service account
Open the Google Cloud console and select the project that holds your data
Go to IAM & Admin → Service Accounts and click + Create service account
Name it
moselle-readerand give it a description like "Moselle read-only access"Click Create and continue, then Done (you'll grant roles in the next step)
Replace <PROJECT_ID> with your project ID.
gcloud iam service-accounts create moselle-reader \
--project=<PROJECT_ID> \
--display-name="Moselle read-only access"Expected Result: A service account with an email like moselle-reader@<PROJECT_ID>.iam.gserviceaccount.com.
Grant read access
The service account needs three roles:
BigQuery Job User
Project
Run read queries, billed to your project
BigQuery Read Session User
Project
Read table data efficiently, billed to your project
BigQuery Data Viewer
Project or one dataset
Read the tables themselves
Go to IAM & Admin → IAM and click + Grant access
In New principals, paste the service account email from step 1
Add the role BigQuery Job User
Add a second role, BigQuery Read Session User
Add a third role, BigQuery Data Viewer, then click Save
To limit Moselle to a single dataset instead of the whole project, skip BigQuery Data Viewer here and grant it on that dataset: open the dataset in BigQuery Studio, click Sharing → Permissions → Add principal, paste the service account email, and choose BigQuery Data Viewer.
gcloud projects add-iam-policy-binding <PROJECT_ID> \
--member="serviceAccount:moselle-reader@<PROJECT_ID>.iam.gserviceaccount.com" \
--role="roles/bigquery.jobUser"
gcloud projects add-iam-policy-binding <PROJECT_ID> \
--member="serviceAccount:moselle-reader@<PROJECT_ID>.iam.gserviceaccount.com" \
--role="roles/bigquery.readSessionUser"
gcloud projects add-iam-policy-binding <PROJECT_ID> \
--member="serviceAccount:moselle-reader@<PROJECT_ID>.iam.gserviceaccount.com" \
--role="roles/bigquery.dataViewer"To limit Moselle to a single dataset, grant BigQuery Data Viewer on that dataset from the console (Sharing → Permissions) instead of the project-wide binding above.
Create a JSON key
Go to IAM & Admin → Service Accounts and click
moselle-readerOpen the Keys tab, then Add key → Create new key
Choose JSON and click Create
A file like <PROJECT_ID>-xxxxxxxx.json downloads to your computer.
gcloud iam service-accounts keys create moselle-reader-key.json \
--iam-account=moselle-reader@<PROJECT_ID>.iam.gserviceaccount.comGoogle shows the private key only once, in this file. Keep it somewhere secure — you'll paste its contents into Moselle in step 5, and Moselle never shows it back to you.
Gather your project details
Alongside the key, have these ready:
Project ID
acme-analytics-prod
Location
US, EU, or a region like europe-west2
Dataset
analytics
Tables to sync
analytics.sales_orders, analytics.inventory_levels, analytics.purchase_orders, analytics.products
Your project ID is shown in the project picker at the top of the Google Cloud console. Each dataset's location is on its Details tab in BigQuery Studio.
Send it securely from Moselle
Log in to Moselle and go to Settings → Integrations → BigQuery, or open this link directly: app.moselle.io/settings/integrations?integration=bigquery
Click Connect on the BigQuery card
In the Credentials box, paste:
The full contents of the JSON key file from step 3
Your project ID and location
The datasets and tables you want synced
Click Send securely
Expected Result: You'll see a "BigQuery credentials sent" confirmation. Our team takes it from there and will be in touch once the connection is live.
Never share the key file over email, Slack, or chat. The Settings form encrypts your credentials as soon as they reach us, and they are never shown again — so keep your own secure copy in case you need to rotate the key.
Connection test and table mapping
Once your key is submitted, the Moselle team runs a test read to confirm access to the tables you listed. If anything needs adjusting — most often a missing role or a dataset the account can't see — we'll contact you with the specific change needed.
We then schedule a short session to confirm which tables and columns feed your sales, inventory, purchase orders, and product catalog, and how sales roll up into Moselle channels.
Expected Result: Your BigQuery data is syncing into Moselle. From here it refreshes automatically.
What this costs you
Tables — read directly with BigQuery's Storage Read API, billed by the amount of data read. No query runs, so there is no scan charge.
Views — run as a query on each sync, billed by the data scanned. Keeping the underlying tables partitioned by date, or having the view include only the history Moselle needs, keeps scans small.
Network egress — Moselle reads from outside Google Cloud, so Google's network egress pricing may apply to the data read. For most sales and inventory tables this is small.
Storage — $0 added. Moselle reads your existing tables and stores nothing new in your project.
Revoking access
You stay in control. To pause or remove Moselle's access at any time:
Rotate the key — delete the key from the service account's Keys tab and send a new one via the secure form
Remove access entirely — delete the
moselle-readerservice account, or remove its IAM roles
Frequently Asked Questions
Last updated