{"base_path":"/","components":null,"consumes":"[\"application/json;charset=UTF-8\"]","definitions":{"DqcErrorResponseVO":{"properties":{"error_code":{"description":"错误码,如DQC.0000,请求处理成功","type":"string"},"error_msg":{"description":"错误信息","type":"string"}},"type":"object"},"RuleTemplateDetailVO":{"properties":{"abnormal_table_template":{"description":"异常表模板","example":"select ${Output_Columns} from ${Schema_Table1}","type":"string"},"category_id":{"description":"目录ID","example":0,"format":"int64","type":"integer"},"create_time":{"description":"创建时间,13位时间戳(精确到毫秒)","example":1640678720014,"format":"int64","type":"integer"},"creator":{"description":"创建者,System代表系统自带","example":"System","type":"string"},"dimension":{"description":"Completeness:完整性,Uniqueness:唯一性,Timeliness:及时性,Validity:有效性,Accuracy:准确性,Consistency:一致性","example":"Completeness","type":"string"},"id":{"description":"id","example":925419155023364097,"format":"int64","type":"integer"},"name":{"description":"name","example":"ruleTemplate1","type":"string"},"result_description":{"description":"结果说明","example":"参考字段名 : ${1}, 一致行数 : ${2}, 不一致行数 : ${3}, 总行数 : ${4}","type":"string"},"sql_info":{"description":"定义关系","example":"select ${Column1},ifnull(a,0),ifnull(b-a,0),ifnull(b,0),ifnull(a/b, 1) from (select (select count(1) from ${Schema_Table1} where ${Column1} in (select ${Column2} from ${Schema_Table2})) a,(select count(1) from ${Schema_Table1}) b)","type":"string"},"system_template":{"description":"是否为系统模板","example":true,"type":"boolean"},"type":{"description":"规则类型,Field:字段级规则,Table:表级规则,Database:库级规则,Cross-field:跨字段级规则,Customize:自定义规则","example":"Table","type":"string"}},"type":"object"},"TemplateRO":{"properties":{"abnormal_table_template":{"description":"异常表模板","example":"select ${Output_Columns} from ${Schema_Table1}","minLength":0,"type":"string"},"description":{"description":"描述","example":"this is a test template","type":"string"},"dimension_id":{"description":"维度ID, 1:完整性,2:唯一性,3:及时性,4:有效性,5:准确性,6:一致性","example":1,"format":"int32","type":"integer"},"directory_id":{"description":"目录","example":0,"format":"int64","type":"integer"},"id":{"description":"template id","example":"925419155023364097","type":"string"},"name":{"description":"template name","example":"ruleTemplate1","type":"string"},"origin_name":{"description":"修改前的模板名","example":"ruleTemplate1","type":"string"},"publish":{"default":false,"description":"是否是发布操作, true:发布新版本 false:普通的保存操作","example":false,"type":"boolean"},"result_description":{"description":"结果说明","example":"参考字段名 : ${1}, 一致行数 : ${2}, 不一致行数 : ${3}, 总行数 : ${4}","type":"string"},"sql_info":{"description":"模板中的sql内容","example":"select ${Column1},ifnull(a,0),ifnull(b-a,0),ifnull(b,0),ifnull(a/b, 1) from (select (select count(1) from ${Schema_Table1} where ${Column1} in (select ${Column2} from ${Schema_Table2})) a,(select count(1) from ${Schema_Table1}) b)","minLength":0,"type":"string"},"status":{"description":"规则模板状态,0表示下线1表示已发布","example":1,"format":"int32","type":"integer"},"user_define_version_name":{"default":"V1.0","description":"用户自定义版本名","example":"V1.0","type":"string"},"version_num":{"description":"获取模板信息时候的版本号","example":1,"format":"int64","type":"integer"}},"type":"object"}},"description":null,"group_id":"23bb69798aaf409da161a43a90617121","host":"dayu.cn-north-4.myhuaweicloud.com","id":"8225106b712147d38f7480129a1c7490","info_version":"v1","method":"post","name":"CreateTemplate","parameters":{},"paths":{"/v2/{project_id}/quality/rule-templates":{"post":{"description":"创建规则模板","operationId":"CreateTemplate","parameters":[{"description":"project id","in":"path","name":"project_id","required":true,"type":"string"},{"description":"DataArts Studio工作空间ID","in":"header","name":"workspace","required":true,"type":"string"},{"description":"token","in":"header","name":"X-Auth-Token","required":true,"type":"string"},{"description":"模板参数","in":"body","name":"TemplateRO","required":true,"schema":{"$ref":"#/definitions/TemplateRO"}}],"produces":["application/json"],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/RuleTemplateDetailVO"}},"400":{"description":"BadRequest","schema":{"$ref":"#/definitions/DqcErrorResponseVO"}},"500":{"description":"INTERNAL SERVER ERROR","schema":{"$ref":"#/definitions/DqcErrorResponseVO"}}},"summary":"创建规则模板","tags":["规则模板接口"],"x-support-sdk":"Y"}}},"product_short":"DataArtsStudio","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":null,"summary":"创建规则模板","tags":"规则模板接口","uri":null,"version":"2.0"}