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

请问,SCQL如何配置中心式多节点的CCL规则以及数据表格同名问题 #360

Open
yongboy opened this issue Sep 18, 2024 · 4 comments
Assignees
Labels
need more information Please provide sufficient information to assist in reproducing and diagnosing the issue

Comments

@yongboy
Copy link

yongboy commented Sep 18, 2024

Issue Type

CCL

Have you searched for existing issues?

Yes

Link to Relevant Documentation

https://www.secretflow.org.cn/zh-CN/docs/scql/0.9.0b1/topics/ccl/usage

Question Details

您好:

实际场景采用 SCQL 中心式部署(一个SCDB,有3个 SCQLEngine):

我这里有两个问题:

  1. 如何设置CCL?
  2. 3个 SCQLEngine后面的mysql参与运算的表格名称都一样,这该怎么写SQL语句 ?

辛苦!

@zimu-yuxi
Copy link

可以先参考这里

@yongboy
Copy link
Author

yongboy commented Sep 19, 2024

我把问题细化一下:

  1. 如何写三个边缘式的参与方的CCL
  2. 如何写SQL查询语句,应对三个同名的数据库、表格(但部署在不同地方)

@tongke6
Copy link
Collaborator

tongke6 commented Sep 19, 2024

请补充更多的细节和背景信息哈,因为不清楚你的场景,table schema,以及要执行的 query 是什么,要保护什么信息,所以也无法给出 CCL 设置建议

@tongke6 tongke6 added the need more information Please provide sufficient information to assist in reproducing and diagnosing the issue label Sep 19, 2024
@yongboy
Copy link
Author

yongboy commented Sep 19, 2024

@tongke6
我继续补充一下:

  1. 一个数据中心,三个机构(分别设置为p1, p2, p3
  2. SCQL采用中心化部署方式,即 1个SCDB + 3个SCQLEngine
  3. 3个机构对外输出数据库名称都是 demo
  4. 3个机构对外输出表格名称都是ta,但具体内容不同
  5. ta表格可公开字段如下:
+-------------+--------+
|    Field    |  Type  |
+-------------+--------+
| id          | string |
| credit_rank | int    |
| income      | int    |
| age         | int    |
+-------------+--------+

具体内容,可参考:https://www.secretflow.org.cn/zh-CN/docs/scql/0.9.0b1/intro/tutorial#create-database-user-and-tables

期待CCL设置(下面仅为描述,不代表实际能够执行成功)

alice> GRANT SELECT PLAINTEXT(ID, credit_rank, income, age) ON demo.ta TO alice;
alice> GRANT SELECT PLAINTEXT_AFTER_JOIN(ID) ON demo.ta TO *;
alice> GRANT SELECT PLAINTEXT_AFTER_GROUP_BY(credit_rank) ON demo.ta TO *;
alice> GRANT SELECT PLAINTEXT_AFTER_AGGREGATE(income) ON demo.ta TO *;
alice> GRANT SELECT PLAINTEXT_AFTER_COMPARE(age) ON demo.ta TO *;

执行查询Query,主要以统计分析总数、平均数、聚合运算为主。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need more information Please provide sufficient information to assist in reproducing and diagnosing the issue
Projects
None yet
Development

No branches or pull requests

3 participants