This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
1、执行接口拉取远程数据库写入文件(这个接口只是暂时用,后面正式任务配置在数据库的)
http://127.0.0.1:18081/batch/test/getTables
接口参数>>
dbName:数据库、必填(yml文件中)
sql:SQL语句、必填(不要“;”号)
fieldSeparator:字段分隔(非必填,默认“\t”)
filename:文件名(非必填,填了则会追加写入,反之每次创建一个,例如:jsyHiveDs-table-2023-08-02-164409.txt)
2、登录sptcc@10.10.241.208服务器,文件生成目录在 /home/sptcc/read_write_data
3、执行命令
curl -X POST -d 'dbName=jsyHiveDs&sql=show tables&fieldSeparator=,&filename=ceshi' http://127.0.0.1:18081/batch/test/getTables
同步的,任务执行结束才会返回如下内容:(如有错误看日志 agile-batch-service/logs/)
{
"code" : 200,
"msg" : "操作成功"
}