When to use a service account
Step 1: Create the service account
1
Create it
In the Google Cloud console, open IAM & Admin, then Service Accounts, select your project and click Create service account. Give it a name such as
markifact.2
Grant BigQuery Job User
In the permissions step, add the role BigQuery Job User. This lets it run queries. It does not give access to any data yet.
3
Finish
Skip the last step and click Done. Copy the service account’s email address, which looks like
markifact@your-project.iam.gserviceaccount.com. You need it in the next step.Step 2: Choose what data it can access
Pick one of the three levels. Data Viewer is read-only. Data Editor also lets Markifact create tables and insert rows.Whole project
When you create the service account (or later in IAM & Admin, then IAM, then Grant access), add BigQuery Data Viewer or BigQuery Data Editor next to BigQuery Job User.One dataset
- In BigQuery, find the dataset in the left panel and click the three dots next to its name.
- Click Share, then Manage permissions.
- Click Add principal and paste the service account’s email.
- Choose BigQuery Data Viewer (read only) or BigQuery Data Editor (read and write), then save.
roles/bigquery.dataEditor to also allow writes.
One table
- In BigQuery, find the table in the left panel and click the three dots next to its name.
- Click Share, then Manage permissions.
- Click Add principal and paste the service account’s email.
- Choose BigQuery Data Viewer, then save.
What works at each level
Step 3: Create a JSON key
- In Service Accounts, open your service account.
- Go to the Keys tab, click Add key, then Create new key.
- Choose JSON and click Create. A
.jsonfile downloads to your computer.
Step 4: Connect in Markifact
- Open Connections and click Connect next to BigQuery.
- Open the Service Account tab.
- Open the downloaded
.jsonfile in a text editor, copy all of it and paste it into the box. - Click Save Connection. Markifact tests the key before saving.
Frequently asked questions
Can I limit Markifact to a single dataset?
Can I limit Markifact to a single dataset?
Yes, and this is the setup we recommend. Give the service account BigQuery Job User on the project, then BigQuery Data Viewer or Data Editor on that dataset only. Markifact then sees that dataset and nothing else in the project.
Can I limit Markifact to a single table?
Can I limit Markifact to a single table?
Yes, for reading. Grant BigQuery Data Viewer on the table. Markifact can query it and read its schema, but the table will not show up in dataset or table lists, so write its full name in the query. To insert rows, grant Data Editor on the dataset instead.
How do I make the connection read-only?
How do I make the connection read-only?
Use BigQuery Data Viewer everywhere and never grant Data Editor. Markifact can then query data, and Google refuses every attempt to create tables or insert rows.
Does the service account need access to my whole project?
Does the service account need access to my whole project?
No. BigQuery Job User on the project only lets it run queries. It cannot read any data until you grant Data Viewer or Data Editor on a project, a dataset or a table.
Why is my dataset or table list empty in Markifact?
Why is my dataset or table list empty in Markifact?
The service account has no dataset-level access. This is expected when you granted access on single tables only. Either grant Data Viewer on the dataset, or keep table-level access and type the full table name in your query.
We are an agency. How do we set this up for several clients?
We are an agency. How do we set this up for several clients?
Ask each client to create a service account in their own Google Cloud project, grant it access to the datasets they want to share, and send you the JSON key. Add one BigQuery connection per client in Markifact. Each connection only reaches that client’s data.
Who pays for the queries?
Who pays for the queries?
Queries run in the project you select in Markifact and are billed to that project by Google, the same as queries you run yourself.
How do I remove Markifact's access?
How do I remove Markifact's access?
Delete the key under Service Accounts, Keys, or remove the service account’s roles. Access stops immediately. Then delete the connection in Markifact.
Good to know
- The key does not expire. It works until you delete it in Google Cloud. To rotate it, create a new key, connect again with it, then delete the old key.
- Keep the file safe. Anyone with the key has the service account’s access. Delete the downloaded file once the connection is saved.
- Key creation can be blocked. Some organizations turn off service account keys with a policy. If Create new key is unavailable, ask your Google Cloud admin or use Quick Connect.

