FATE-Flow icon indicating copy to clipboard operation
FATE-Flow copied to clipboard

Support read data from mysql when upload data

Open FancyXun opened this issue 1 year ago • 4 comments

Follow this issue: https://github.com/FederatedAI/FATE/issues/5669

Support uploading data from mysql:

Change the 'file' in upload_guest_mysql.json like bellow:

{ "file":"mysql://root:[email protected]:13312/fl/BREAST_HETERO_GUEST", "head": true, "partitions": 16, "extend_sid": true, "meta": { "delimiter": ",", "label_name": "y", "match_id_name": "id" }, "namespace": "experiment", "name": "breast_hetero_guest_mysql" }

Upload data flow data upload -c upload_guest_mysql.json

The three formats of the file variable in this JSON are as follows:

mysql://user:password@host_ip:host_port/db/table file:///path/to/local_file.csv /path/to/local_file.csv

FancyXun avatar Jul 19 '24 01:07 FancyXun

@sagewe @dylan-fan

FancyXun avatar Jul 19 '24 01:07 FancyXun

首先很感谢你的贡献,社区对DCO有强制要求,请依照 Details 进行修复

有空看看 @zhihuiwan

sagewe avatar Jul 19 '24 02:07 sagewe

首先很感谢你的贡献,社区对DCO有强制要求,请依照 Details 进行修复

有空看看 @zhihuiwan

Done!

FancyXun avatar Jul 19 '24 03:07 FancyXun

补充一下:这样做的好处就是,能兼容现有的upload.json,只需要根据里面file的前缀判断是用读取mysql或者本地文件,json不需要新增内容。 @sagewe

FancyXun avatar Jul 22 '24 01:07 FancyXun