I have a data stream with the following structure
user_id (integer)
user_name (string)
user_idis something between 100 and 65536. I want to add a field target_user_id(integer) according to the following logic:
- If it
user_idis in the range 1000..9999, then let the field target_user_idbe equaluser_id - If not, fill out
target_user_idsomething in the range 1000..9999 without causing a conflict. Preferably the smallest possible.
The length of the stream is less than 9000. The field is user_idunique in the original stream.
source
share