Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database sharing #3430

Closed
5 tasks
Tracked by #3428
BohuTANG opened this issue Dec 13, 2021 · 6 comments
Closed
5 tasks
Tracked by #3428

Database sharing #3430

BohuTANG opened this issue Dec 13, 2021 · 6 comments
Assignees
Labels

Comments

@BohuTANG
Copy link
Member

BohuTANG commented Dec 13, 2021

Summary

Tasks:

  • CREATE SHARE <name>
  • GRANT USAGE ON DATABASE <name> TO SHARE <share_name>
  • ALTER SHARE <share_name> ADD|REMOVE ACCOUNTS=<orgname.accountname1>,<orgname.accountname2>
  • SHOW SHARES
  • DROP SHARE
@BohuTANG BohuTANG added the C-feature Category: feature label Dec 13, 2021
@ZhiHanZ
Copy link
Collaborator

ZhiHanZ commented Dec 13, 2021

I think data share is to share data/table to another S3 bucket or folder similar to the design in snowflake
https://docs.snowflake.com/en/user-guide/secure-data-sharing-across-regions-plaforms.html#data-sharing-considerations?

@ZhiHanZ ZhiHanZ closed this as completed Dec 13, 2021
@ZhiHanZ ZhiHanZ reopened this Dec 13, 2021
@PsiACE PsiACE added the v0.7 label Dec 13, 2021
@flaneur2020
Copy link
Member

there're a few sentences about data sharing in the snowflake's blog:

A powerful feature such as Snowflake Data Sharing is also achieved by a metadata-only operation. The data share object is created containing references to the source and destination catalog objects and access control objects. Data sharing does not copy data from the provider, it exposes the data to the consumer via the data share object.

https://www.snowflake.com/blog/how-foundationdb-powers-snowflake-metadata-forward/

@BohuTANG
Copy link
Member Author

For share createing it's metadata-only:

create share share1; // create a share in metasrv: /tenant/share/share1
grant usage on database db1 to share share1; // grant privileges and database object to the share
alter share share1 add accounts=tenant1;      // create a share in tenant1, but the direction is InBound

The hard parts is that how we check the privileges on db1 when we accessing it.

@flaneur2020
Copy link
Member

flaneur2020 commented Dec 22, 2021

there might have some hard works needs to be addressed before working on shares, including:

  • a global metadata which across multiple regions
  • manage organization & accounts in the metadata center (currently there's no organization in the databend-query's view)

@BohuTANG BohuTANG mentioned this issue Dec 30, 2021
4 tasks
@youngsofun
Copy link
Member

/assignme

@lichuang
Copy link
Contributor

lichuang commented Aug 29, 2022

there is a tracing issue about share SQL support: #6973

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants