Warm tip: This article is reproduced from stackoverflow.com, please click
google-bigquery google-cloud-platform

If a user queries a public BigQuery database can the data owner see the query that was executed

发布于 2020-04-07 10:21:24

Consider two different projects: their-project (to which I have no access) and my-project to which I have high-level access. If a user in their-project queries data stored in a BigQuery table that is associated with my-project, can I see the query? Or, failing that, can I see how many queries users executed?

Background My current project is considering releasing some data in BigQuery. But we would like to see how users are accessing this data so we can decide where to spend our effort in enhancing the released data. I looked at this question about usage data but is not clear whether the solution proposed would work when the query is part of someone else's project.

Questioner
Eponymous
Viewed
80
Thomas Ruble 2020-02-01 03:47

You cannot see their query if you don't have access to the logs in their-project.

However, with Audit Logs in my-project you will see the identity of users that access your tables. But it stops there. You will know which columns & tables people are reading, but not the actual content of their query.

As for the count of queries, there is some correlation between count of audit logs and count of queries, but my hunch is that counting audit logs will only put you in the ballpark.