Support read data from mysql when upload data
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
@sagewe @dylan-fan
补充一下:这样做的好处就是,能兼容现有的upload.json,只需要根据里面file的前缀判断是用读取mysql或者本地文件,json不需要新增内容。 @sagewe