bigQuery Google Cloud how to share dataset with other users?

折月煮酒 提交于 2020-01-14 05:55:07

问题


I have a bigQuery dataset defined in Google Cloud with my userA account, and I want my colleague userB, who is a member of the same group, to be able to see the dataset that I have defined. Using the bq command-line interface, userB can see the project, but not the dataset. How can I share the dataset created by userA with userB?


回答1:


On the Web UI of BigQuery, there is a dropdown menu to the right of the dataset's name. There, you can choose Share Dataset:

On the popup window, you'll be able to add Google Groups, Individual Users, or even Service Accounts. The permissions you'll be able to assign here are Primitive roles. As explained in the BigQuery Web UI documentation:

"Can view" (READER) grants bigquery.dataViewer access to the dataset.

"Can edit" (WRITER) grants bigquery.dataEditor access to the dataset.

"Is owner" (OWNER) grants bigquery.dataOwner access to the dataset.

If you want to know more about BigQuery permissions, you can check this link, it lists all currently available permissions.

Note that you can also do this via bq or directly via the RESTful API.




回答2:


There is a dropdown menu on the right of the dataset:

As explained in the Web UI documentation:

Click the drop-down arrow to the right of the dataset and choose Share Dataset.

In the Share Dataset dialog, to modify existing entries:

Remove existing entries by clicking the X icon to the right of the user, group, or service account. Change permissions for a user, group, or service account by clicking the permissions button and choosing an appropriate access level: Is owner (OWNER), Can edit (WRITER), or Can view (READER). For more information on dataset-level roles, see Primitive roles for datasets. In the Share Dataset dialog, to add new entries:

Click the drop-down to the left of the Add People field and choose the appropriate option.

Type a value in the text box. For example, if you chose User by e-mail, type the user's email address.

To the right of the Add People field, click Can view and choose the appropriate role from the list.

Add people to dataset

"Can view" (READER) grants bigquery.dataViewer access to the dataset. "Can edit" (WRITER) grants bigquery.dataEditor access to the dataset. "Is owner" (OWNER) grants bigquery.dataOwner access to the dataset. Click Add.

When you are done adding, deleting, or modifying your access controls, click Save changes.

Verify your access controls by clicking the drop-down arrow to the right of the dataset and choosing Share Dataset. You can confirm the settings in the Share Dataset dialog.



来源:https://stackoverflow.com/questions/48911538/bigquery-google-cloud-how-to-share-dataset-with-other-users

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!