'BigQuery: How to share job results?
User A runs a job. User A shares link to the Job with User B.
User B can see the Job details, but not the results:
User does not have permission to access results of another user's job
Two questions:
- Why?
- Is there a way to allow user B to see the results without persisting them into a permanent table?
Solution 1:[1]
Good questions!! Why? I don't know. I got strange result when I tried to getIamPolicy on the temporary table. I got a error 500 "Unknown"
I suppose that cached table is only accessible by the user that created it. It should be a legacy mode.
A solution to solve your issue is to impersonate the same service account by the User A when it perform the request and by the user B when it read the request.
Like that, the same user, the service account, create the query and read it, even if the originators aren't the same.
EDIT1
If impersonation is not a solution, you can persist temporary the data in a BigQuery table. Define a dataset for that temporary table, and set a table expiration parameter.
The minimal duration is 1h, but you can handle it as a normal table and it will be cleaned automatically. It's pretty similar than BigQuery cached query, but this time, it's sharable!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
