I have a data in which one column is a vector
data looks like this
[^X 2 4 22 22 19 8 ]
^X is the vector length prefix ( 1 bytes)
the rest are elements of the vector.
Is there any way i can convert the output to a delimited string array ?
Output should be like
'2'|'4'|'22'|'22'|'19'|'8'|
I could do a column export with appropriate delimiter & quote char and use modify stage to remove the 1 byte prefix using spec : substring[1,x](colname), and remove the vector definition from the output column using edit column metadata - but i think its not an elegant way of doing so - even though it seems to achieve the desired result.
Variable Length Vector to Delimited String Array
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Yes , I countinued with the 'workaround' I have ( The modify stage trimming made it look inelegant to me ) . But i think the variable length vector can be padded ( or defined in column metadata) to a fixed length that will be all inclusive . The split vector stage will require a fixed length vector input to work. The trick with split vector stage is to name the split columns the same name as the vector input column , appended with an index number staring with 0 to n-1 ( For a fixed vector of n elements)