|
@@ -187,14 +187,15 @@ def data_resource_save():
|
|
if not storage_location:
|
|
if not storage_location:
|
|
return jsonify(failed("参数不完整:缺少storage_location或storage_location为空"))
|
|
return jsonify(failed("参数不完整:缺少storage_location或storage_location为空"))
|
|
|
|
|
|
- # 调用业务逻辑处理数据资源创建
|
|
|
|
- resource_id = handle_node(receiver, head_data, data_resource)
|
|
|
|
|
|
+ # 调用业务逻辑处理数据资源创建,设置resource_type为structure
|
|
|
|
+ resource_id = handle_node(receiver, head_data, data_resource, resource_type='structure')
|
|
elif file_extension == 'sql':
|
|
elif file_extension == 'sql':
|
|
data_source = receiver['data_source']
|
|
data_source = receiver['data_source']
|
|
# 如果是ddl,则需要检查data_source是否存在
|
|
# 如果是ddl,则需要检查data_source是否存在
|
|
if not data_source or (isinstance(data_source, dict) and not data_source.get("en_name")):
|
|
if not data_source or (isinstance(data_source, dict) and not data_source.get("en_name")):
|
|
return jsonify(failed("数据源信息不完整或无效"))
|
|
return jsonify(failed("数据源信息不完整或无效"))
|
|
- resource_id = handle_node(receiver, head_data, data_resource, data_source)
|
|
|
|
|
|
+ # 调用业务逻辑处理数据资源创建,设置resource_type为ddl
|
|
|
|
+ resource_id = handle_node(receiver, head_data, data_resource, data_source, resource_type='ddl')
|
|
else:
|
|
else:
|
|
return jsonify(failed("文件格式错误"))
|
|
return jsonify(failed("文件格式错误"))
|
|
|
|
|