Copy data between fields in Activespaces
book
Article ID: KB0073407
calendar_today
Updated On:
Description
How to copy data between fields in ActiveSpaces without stopping cluster using as-admin.
Environment
All Platforms
Resolution
From as-admin you can create new field and copy data from one fields to another field.
Sample space before alter the space and update.
==========================================
Space "PRODUCTS"
_____________________________________________________________________________________________
Field Name | Field Type | Nullable | Encrypted |
-------------------------------------------------------------------------------------------
PRODUCT_ID | string | true | false |
PRODUCT_NAME | string | true | false |
MAPPING_STATUS | string | true | false |
Key: {KeyDef type=hash_index, fields=PRODUCT_ID}
Distribution Fields: None
Index: None
=============================================
1) join space "PRODUCTS"
2) alter space "PRODUCTS" add (field name "MAPPING_STATUS_NEW" type "string") // defined new field
==========================================
Space "PRODUCTS"
_____________________________________________________________________________________________
Field Name | Field Type | Nullable | Encrypted |
-------------------------------------------------------------------------------------------
PRODUCT_ID | string | true | false |
PRODUCT_NAME | string | true | false |
MAPPING_STATUS | string | true | false |
MAPPING_STATUS_NEW | string | true | false |
==========================================
3) update space "PRODUCTS" "set MAPPING_STATUS_NEW = MAPPING_STATUS" // copy data from one field to new field
4) show space "PRODUCTS" entries // will show updated entries
Note : once the new field defined need restart and introspect BW applications or clients to get newly added fields. It will take a long time for big data set. Note that this is distributed to all seeders are updating their data in parallel
Issue/Introduction
How to copy data between fields in ActiveSpaces without stopping cluster.
Feedback
thumb_up
Yes
thumb_down
No