Resolve a structured-load backfill start¶
Backfill starting point for parsing database structured import tasks.
POST $CLOUDSIGMA_API_BASE/connectors/structured/v1/source/backfill-start/resolve
Before you call¶
Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region.
Prepare personal access token and target workspace ID that can access the target workspace.
Select the connector that can resolve the backfill starting point, and obtain the connector_id and source_type from the selected record.
Locate the source object:
Select the source database to obtain the database.
If the selected connector supports Schema hierarchy, select source Schema to get the schema. Otherwise, the schema is not filled in.
Select the source object to obtain the table or collection.
Fill in the same connector ID into connector_id and source.connector_id, and then fill in the source object selected this time.
Select backfill starting point mode.
Request body¶
Replace the source objects in $CLOUDSIGMA_API_KEY, $WORKSPACE_ID and examples with actual values.
Default
curl -X POST "$CLOUDSIGMA_API_BASE/connectors/structured/v1/source/backfill-start/resolve" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d "{
\"connector_id\": \"$CONNECTOR_ID\",
\"source\": {
\"connector_id\": \"$CONNECTOR_ID\",
\"source_type\": \"$SOURCE_TYPE\",
\"database\": \"$DATABASE\",
\"table\": \"$TABLE\"
},
\"start_mode\": \"auto\"
}"
Fill in the custom starting point
source is used to locate a source object and does not represent another connector. Use connector_id and source_type from the same connector record to fill in the corresponding fields in the top level and source.
Always fill in
databasefor the selected object.Fill in
source.schemawhen the object containsschema.Fill in the table object
source.table. For MongoDB collections, fill insource.collectionand leavesource.tableblank.Automatic parsing: Set start_mode to auto and do not pass non-empty custom_start_value. The interface returns the parsed backfill starting point.
Custom starting point: Set start_mode to custom and pass in custom_start_value. Fill in kind first, then fill in the value field corresponding to the type. When
start_modeiscustom,custom_start_valuerepresents a typed value: specify the type withkind, and then fill in only the value field corresponding to the type.
curl -X POST "$CLOUDSIGMA_API_BASE/connectors/structured/v1/source/backfill-start/resolve" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d "{
\"connector_id\": \"$CONNECTOR_ID\",
\"source\": {
\"connector_id\": \"$CONNECTOR_ID\",
\"source_type\": \"SOURCE_TYPE_MYSQL\",
\"database\": \"appdb\",
\"table\": \"orders\"
},
\"start_mode\": \"custom\",
\"custom_start_value\": {
\"kind\": \"int64\",
\"int64_value\": \"100\"
}
}"
Default
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
The connector ID to resolve the starting point of the backfill. Use the same value as |
|
object |
Yes |
A single database object to parse the starting point of the backfill. The source table to parse the starting point of the backfill. |
|
string |
Yes |
The connector ID to which the source object belongs. The connector ID to which the source table belongs. |
|
string |
Yes |
Structured source type for the source connector. |
|
string |
Yes |
The name of the database to which the object belongs. The name of the database to which the source table belongs. |
|
string |
No |
Schema to which the object belongs. Fill in if the object result contains this field. |
|
string |
Required when filling out the form |
Table name. |
|
string |
Required when gathering |
Collection name. |
|
JSON |
No |
Reserved watermark configuration field. Current starting point resolution does not rely on this field. |
|
string |
Yes |
Starting point mode: |
|
JSON |
Required when custom |
Custom starting point value. In |
|
string |
Yes |
Source table name. |
|
object |
Yes |
Custom starting point. |
|
string |
Yes |
Value type identifier. The example uses |
|
string |
Yes |
The starting point value of type |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"start_position": {
"kind": "int64",
"int64_value": "100"
},
"display_value": "100"
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
JSON |
The parsed backfill starting point. Returned as a JSON object containing the source value and its type. |
|
string |
Display value for backfill starting point. May be omitted if there is no displayed value. |
Error response¶
{
"code": "ErrParamInvalid",
"msg": "参数错误信息",
"data": null
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
Readable error message. |
|
null |
The error response is |