Object Storage

 How to splitt a field

  • HV Object Storage
  • Hitachi Content Intelligence HCI
Beate Dippell's profile image
Beate Dippell posted 03-20-2018 11:58

Hi,

I have a field which can contain 2 indezies or 3.

Example: It looks like this

  • $IP_NameLaura SPONTON

Or

  • $IP_NameLars ZUR BRUEGGE

 

I tried it with field parser and \s as tokinzer. So in example one index2 is empty and I get an error.

For example two it works. And if I only use index0 and index1 I only get ZUR instead of ZUR BRUEGGE.

 

Any ideas to solve this?

 

Thanks Beate


#HitachiContentIntelligenceHCI
Jonathan Chinitz's profile image
Jonathan Chinitz

Try using the "Tokenizer" stage (under Transform palette).

Beate Dippell's profile image
Beate Dippell

Hi Jon,

And how can I then move them in 2 or 3 fields?

  • $IP_SurnameLars | ZUR | BRUEGGE
Kc Kancherla's profile image
Kc Kancherla

you can enable "Add Debug Fields" in your field parser stage and it will give you all the tokens available in that field.

pastedimage_0

Add a conditional to check if the third token exists, if it exists then assign the value to token2.

pastedimage_1

if the third token does not exist then it will skip the conditional and you will get your first two tokens.

pastedimage_2

Thanks,

KC.

Beate Dippell's profile image
Beate Dippell

Hi KC,

Thanks a lot this did it.

I had before the same idea but I put the "if" on the wrong possition.

But with your hint it work.

Great.

Thanks Beate