为自助式源配置浏览规范(批处理SDK)
浏览规范定义浏览和检查源中包含的对象所需的参数。 浏览规范还定义了浏览和检查对象时返回的响应格式。
TIP
浏览规范采用硬编码,您只需将以下有效负载复制并粘贴到连接规范中即可。
"exploreSpec": {
"name": "Resource",
"type": "Resource",
"requestSpec": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object"
},
"responseSpec": {
"$schema": "http: //json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"format": {
"type": "string"
},
"schema": {
"type": "object",
"properties": {
"columns": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string"
}
}
}
}
}
},
"data": {
"type": "array",
"items": {
"type": "object"
}
}
}
}
}
浏览规范
描述
示例
name定义浏览规范的名称或标识符。
Resourcetype定义浏览规格的类型。
ResourcerequestSpec包含浏览连接中的对象所需的参数。
requestSpec.type定义请求规范的数据类型。
objectresponseSpec包含用于定义针对浏览调用返回的响应消息的格式的参数。
responseSpec.type定义响应规范的数据类型。
objectresponseSpec.properties包含与响应消息的格式相关的信息。
responseSpec.properties.format定义响应架构的格式。
objectresponseSpec.properties.format.type定义属性的数据类型。
stringresponseSpec.schema包含与响应模式的格式相关的信息。
responseSpec.schema.type定义架构的数据类型。
objectresponseSpec.schema.properties包含有关架构中保留的列、类型和项目的信息。
responseSpec.schema.properties.columns.items.properties.name显示文件的名称。
responseSpec.schema.properties.columns.items.properties.name.type定义文件名的数据类型。
string后续步骤
填充浏览规范后,您可以使用Flow Service API继续创建完整的连接规范。 有关详细信息,请参阅自助源(批处理SDK) API指南。
recommendation-more-help
337b99bb-92fb-42ae-b6b7-c7042161d089