1
votes

What is the recommended way to provide Bigquery access to end users?

We have a multitenant application for appengine where each company has its own namespace in Datastore. We can ingest data from these individual namespaces into BigQuery and run various reports.

We would like to let our users to be able to run queries in their respective BigQuery projects. What is the best way to achieve this?

Possible options:

  • user sends query to appengine, which passes it to his BigQuery project and returns reply
  • user sends query to BigQuery directly. The question here, how is the best to faciliate this?
  • some other way?
1

1 Answers

1
votes

My favorite is "user sends query to BigQuery directly. The question here, how is the best to faciliate this?":

BigQuery supports sharing datasets with specific individuals. So you could load each table into its own dataset, and then share that dataset with the individual customers (or even with groups).

You can do this manually on the web UI or, via the REST API:

access[].domain         A domain to grant access to. Any users signed in with the domain specified will be granted the specified access. Example: "example.com".
access[].groupByEmail   A fully-qualified email address of a mailing list to grant access to. This must be either a Google Groups mailing list (ends in @googlegroups.com) or a group managed by an enterprise version of Google Groups.
access[].userByEmail    A fully qualified email address of a user to grant access to. For example: [email protected].
access[].role           READER, WRITER, OWNER

https://developers.google.com/bigquery/docs/reference/v2/datasets/update