Resolve a structured-load backfill start

Backfill starting point for parsing database structured import tasks.

HTTP
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.

  1. Prepare personal access token and target workspace ID that can access the target workspace.

  2. Select the connector that can resolve the backfill starting point, and obtain the connector_id and source_type from the selected record.

  3. Locate the source object:

  4. Fill in the same connector ID into connector_id and source.connector_id, and then fill in the source object selected this time.

  5. Select backfill starting point mode.

Request body

Replace the source objects in $CLOUDSIGMA_API_KEY, $WORKSPACE_ID and examples with actual values.

Default

Shell
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 database for the selected object.

  • Fill in source.schema when the object contains schema.

  • Fill in the table object source.table. For MongoDB collections, fill in source.collection and leave source.table blank.

  • 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_mode is custom, custom_start_value represents a typed value: specify the type with kind, and then fill in only the value field corresponding to the type.

Shell
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

connector_id

string

Yes

The connector ID to resolve the starting point of the backfill. Use the same value as source.connector_id.

source

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.

source.connector_id

string

Yes

The connector ID to which the source object belongs. The connector ID to which the source table belongs.

source.source_type

string

Yes

Structured source type for the source connector.

source.database

string

Yes

The name of the database to which the object belongs. The name of the database to which the source table belongs.

source.schema

string

No

Schema to which the object belongs. Fill in if the object result contains this field.

source.table

string

Required when filling out the form

Table name.

source.collection

string

Required when gathering

Collection name.

watermark

JSON

No

Reserved watermark configuration field. Current starting point resolution does not rely on this field.

start_mode

string

Yes

Starting point mode: auto automatically parses, custom uses a custom starting point. Fixed to custom, indicating using a custom starting point.

custom_start_value

JSON

Required when custom

Custom starting point value. In auto mode, omit or pass in null.

source.table

string

Yes

Source table name.

custom_start_value

object

Yes

Custom starting point.

custom_start_value.kind

string

Yes

Value type identifier. The example uses int64.

custom_start_value.int64_value

string

Yes

The starting point value of type int64, passed as a string.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "start_position": {
      "kind": "int64",
      "int64_value": "100"
    },
    "display_value": "100"
  }
}

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data.start_position

JSON

The parsed backfill starting point. Returned as a JSON object containing the source value and its type.

data.display_value

string

Display value for backfill starting point. May be omitted if there is no displayed value.

Error response

JSON
{
  "code": "ErrParamInvalid",
  "msg": "参数错误信息",
  "data": null
}

Field

Type

Description

code

string

error code.

msg

string

Readable error message.

data

null

The error response is null.

Last updated on