Updating Index Structures
Function
This API is used to update the index structures of the CloudTable tables when you add or delete user or item features.
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID, which is used for resource isolation. For details about how to obtain the project ID, see Obtaining a Project ID. |
Request
Table 2 describes the request parameters.
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| workspace_id | No | String | The default value is 0. |
| job_name | Yes | String | Training job name. The value can contain a maximum of 20 characters. |
| job_description | No | String | Training job description. The value can contain a maximum of 256 characters. |
| algorithm_type | Yes | String | Algorithm type:
|
| algorithm_parameters | Yes | JSON | Algorithm parameter:
|
| storage | Yes | JSON | Storage platform. For details, see Table 5. |
| offline_platform | Yes | JSON | Offline computing platform. For details, see Table 3. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| platform | Yes | String | Platform name. The value can contain a maximum of 64 characters. Currently, only DLI is supported. |
| platform_parameter | Yes | JSON | Platform parameter. For details, see Table 4. |
| computing_resource | No | String | Resource specifications required for the normal running of the DLI jobs. |
| config_load_path | Yes | String | Path to read the configuration sources. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| cluster_name | Yes | String | Cluster name |
| cluster_id | No | String | Cluster ID |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| user_profiles_table | No | JSON | User attribute storage table. For details, see Table 8. This parameter is mandatory when algorithm_type is set to INITIAL_PROFILES_GENERATION. |
| item_profiles_table | No | JSON | Item attribute storage table. For details, see Table 8. This parameter is mandatory when algorithm_type is set to INITIAL_PROFILES_GENERATION. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| job_id | Yes | String | Job ID. The following operators can be used as job IDs: the User Profile-Item Profile-Standard Wide Table Generation operator, the Update User Profile Based on User Data operator, and the Update Item Profile Based on Item Data operator. |
| new_global_features_info | Yes | String | Global feature file (JSON) that contains the feature names, feature types, and feature value types. The new global feature file (new_global_features_info) includes features added or deleted based on the global feature file corresponding to the original job ID (job_id). The feature types corresponding to the duplicate feature names in two files must be the same. |
Response
Table 7 describes the response parameters.
| Parameter | Type | Description |
|---|---|---|
| job_name | String | Job name |
| job_id | String | Job ID |
| is_success | Boolean | Whether the request is successful |
| error_message | String | Error message that indicates a request has failed. This parameter is unavailable when a request is successful. |
| error_code | String | Error code that indicates a request has failed. This parameter is unavailable when a request is successful. |
| create_time | Long | Time when a job is created |
| etl_uuid | String | Candidate set ID |
Example
- Example request
{ "job_name": "update_schema", "job_description": "online test", "algorithm_type": "UPDATE_INDEX_SCHEMA", "algorithm_parameters": { "job_id": "29587a920dc3434b8ab9c5896f471103", "new_global_features_info": "<Path for storing the new global feature files>" }, "offline_platform": { "platform": "DLI", "platform_parameter": { "cluster_name": "res_cluster" }, "config_load_path": "<Path for storing the configuration sources>", "computing_resource": "", "job_log": "<Path for storing job logs>" }, "storage": { "user_profiles_table": { "platform": "CloudTable", "platform_parameter": { "cluster_id": "a9cefd7a-ce85-44fa-bda5-0d0ae8dd8500", "cluster_name": "cloudtable-res", "table_name": "user-test-10", "data_version": "V2", "region_info": { "region_num": 8, "index_region_num": 8 } } }, "item_profiles_table": { "platform": "CloudTable", "platform_parameter": { "cluster_id": "a9cefd7a-ce85-44fa-bda5-0d0ae8dd8500", "cluster_name": "cloudtable-res", "table_name": "item-test-10", "data_version": "V2", "region_info": { "region_num": 8, "index_region_num": 8 } } } } } - Example of a successful response
{ "is_success": true, "job_id": "d832b07540594ea980c140fea5a10849", "job_name": "gggggggggggggggg", "create_time": "1543891781990", "etl_uuid": "a53a685c52f4476f833d256620b6fc80" } - Example of a failed response
{ "is_success": false, "error_code": "res.2006", "error_msg": "The datasourceUrl(<Path for storing the data sources>) is not match Bucket structure." }
Last Article: Editing and Modifying Jobs
Next Article: Global Configuration-related APIs
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.