Generate export target column mappings

Generates target column suggestions for the OmniFabric target table that the source column can write to. This operation does not save export tasks or column mappings.

HTTP
POST $CLOUDSIGMA_API_BASE/connectors/mo/column/mapping

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. Obtain the OmniFabric connector ID from Query connector list and prepare the target database, table and source column type.

Requires the export task creation permission of the target workspace and the use permission of the target connector.

Request body

Replace the connector, database, table, and column types in $CLOUDSIGMA_API_KEY, $WORKSPACE_ID, and examples with actual values.

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/connectors/mo/column/mapping" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d @- <<EOF
{
    "connector_id": "$CONNECTOR_ID",
    "database": "analytics",
    "table": "orders",
    "export_columns": {
      "source_id": "bigint",
      "order_total": "decimal(10,2)"
    }
  }
EOF

Parameter

Type

Required

Description

connector_id

string

Yes

OmniFabric target connector ID.

database

string

Yes

Target database name.

table

string

Yes

Target table name.

export_columns

object

Yes

The source column to be exported and its data type. The object key is the source column name and the value is type string.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "column_map": {
      "source_id": [
        "id"
      ],
      "order_total": [
        "total_amount"
      ]
    },
    "need_mapping_columns": [
      "created_at"
    ]
  }
}

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data.column_map

object

A map with source column names as keys and a list of compatible target columns as values.

data.need_mapping_columns

array of string

A column in the target table that is not nullable and does not have a default value set.

Error response

JSON
{
  "code": "ErrServer",
  "msg": "无法读取目标表结构"
}

Field

Type

Description

code

string

error code.

msg

string

Readable error message.

Last updated on