def add_column_certain_matches(project_id):
'''
Specify certain column matches (exact match on a subset of columns equivalent
to entity identity). This is used to test performances.
wrapper around ESLinker.add_col_certain_matches
GET:
- project_id: ID for "link" project
POST:
- column_certain_matches: {dict object}: (see doc in original function)
'''
column_matches = request.json['column_certain_matches']
proj = ESLinker(project_id=project_id)
proj.add_col_certain_matches(column_matches)
return jsonify(error=False)
#@app.route('/api/link/add_columns_to_return/<project_id>/<file_role>/', methods=['POST'])
#@cross_origin()
#def add_columns_to_return(project_id, file_role):
# '''
# Specify columns to be included in download version of file. For link project
#
# # TODO: shouldn't this be for normalize also ?
#
# wrapper around ESLinker.add_cols_to_return
#
# GET:
# project_id: ID for "link" project
# file_role: "ref" or "source"
# '''
# columns_to_return = request.json
# proj = ESLinker(project_id=project_id)
# proj.add_cols_to_return(file_role, columns_to_return)
# return jsonify(error=False)
api.py 文件源码
python
阅读 28
收藏 0
点赞 0
评论 0
评论列表
文章目录