You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
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" : "操作成功"
|
|
|
|
|
}
|