This API is used to add rules for data processing.
POST /v3/{project_id}/jobs/batch-transformation
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
project_id |
Yes |
String |
Project ID of a tenant in a region |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
Content-Type |
Yes |
String |
The content type. The default value is application/json. |
X-Auth-Token |
Yes |
String |
User token obtained from IAM. |
X-Language |
No |
String |
Request language type Default value: en-us Values:
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
jobs |
Yes |
Array of CheckDataTransformationReq objects |
Requests for adding data processing rules in batches. |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
job_id |
No |
String |
Task ID. |
object_info |
No |
Array of DatabaseObjectVO objects |
Object information. This parameter is mandatory when a processing rule is generated. |
transformation_info |
Yes |
TransformationInfo object |
Processing information. |
config_transformation |
No |
ConfigTransformationVo object |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
id |
No |
String |
Database name and database table name. For example, the format is lxl_test1-*-*-test_1, where lxl_test1 is the database name and test_1 is the table name. |
select |
No |
String |
Whether to select advanced configuration. The value is true. |
leavesNum |
No |
String |
Level of a processing object. The default value is 0. |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
transformation_type |
Yes |
String |
|
value |
Yes |
String |
Filter criteria. The processing rule value is a SQL statement, and the configuration rule value is config. The value contains a maximum of 256 characters. |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
db_table_name |
Yes |
String |
Database-name.Table-name, for example, lxl_test1.test_1, where lxl_test1 is the database name and test_1 is the table name. |
db_name |
Yes |
String |
Database name. The value contains a maximum of 256 characters. |
table_name |
Yes |
String |
Table name The value contains a maximum of 256 characters. |
col_names |
Yes |
String |
Column name The value contains a maximum of 256 characters. |
prim_key_or_index |
Yes |
String |
Primary key or unique index The value contains a maximum of 256 characters. |
indexs |
Yes |
String |
Index that requires optimization. The value contains a maximum of 256 characters. |
values |
Yes |
String |
Filtering criteria. The value contains a maximum of 256 characters. |
Status code: 200
Parameter |
Type |
Description |
|---|---|---|
results |
Array of DataTransformationResp objects |
Batch data processing response list. |
count |
String |
Total number. |
Parameter |
Type |
Description |
|---|---|---|
id |
String |
Task ID. |
status |
String |
Status Values:
|
error_code |
String |
Error code, which is optional and indicates the returned information about the failure status. |
error_msg |
String |
Error message, which is optional and indicates the returned information about the failure status. |
https://{EndPoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-transformation
{
"jobs" : [ {
"job_id" : "e894593d-5e0a-4652-af7e-1b0c239jb201",
"object_info" : [ ],
"transformation_info" : {
"transformation_type" : "configConditionalFilter",
"value" : "config"
},
"config_transformation" : {
"col_names" : "id,name",
"db_name" : "lxl_test1",
"db_table_name" : "lxl_test1.test_1",
"indexs" : "name",
"prim_key_or_index" : "id",
"table_name" : "test_1",
"values" : "name like '%a%'"
}
} ]
}
https://{EndPoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-transformation
{
"jobs" : [ {
"job_id" : "e894593d-5e0a-4652-af7e-1b0c239jb201",
"object_info" : [ {
"id" : "lxl_test1-*-*-test_1",
"select" : "true"
} ],
"transformation_info" : {
"transformation_type" : "contentConditionalFilter",
"value" : "id>5"
}
} ]
}
Status code: 200
OK
{
"count" : 1,
"results" : [ {
"id" : "e894593d-5e0a-4652-af7e-1b0c239jb201",
"status" : "success"
} ]
}
Status Code |
Description |
|---|---|
200 |
OK |
400 |
Bad Request |
For details, see Error Code.