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.
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.
Prepare personal access token and target workspace ID that can access the target workspace.
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.
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 |
|---|---|---|---|
|
string |
Yes |
OmniFabric target connector ID. |
|
string |
Yes |
Target database name. |
|
string |
Yes |
Target table name. |
|
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¶
{
"code": "OK",
"msg": "OK",
"data": {
"column_map": {
"source_id": [
"id"
],
"order_total": [
"total_amount"
]
},
"need_mapping_columns": [
"created_at"
]
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
object |
A map with source column names as keys and a list of compatible target columns as values. |
|
array of string |
A column in the target table that is not nullable and does not have a default value set. |
Error response¶
{
"code": "ErrServer",
"msg": "无法读取目标表结构"
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
Readable error message. |