0

I would like to reform pig latin result.
With some pig latin, let say 'dump table1', gives me following result.
(Test 1,1.0,Link1 Link2 Link3 ) which '\t' exists between Link1, Link2, Link3.
I would like to reform the result that would look like
(Test 1, Link1)
(Test 1, Link2)
(Test 1, Link3)

Does anybody know how I can create this?

Thanks in advance.

John Doyle
  • 898
  • 2
  • 9
  • 22

1 Answers1

0

You can use the TOKENIZE built-in UDF, which will give you a bag of the different tokens in your string. If the only non-alphanumeric character you have is tab, then this will work fine. Just FLATTEN the resulting bag and you'll have the different tokens in different rows, just as you want.

If your strings are more complicated than you have shown, and you need to have precise control over how they are split, you can use STRSPLIT, but this returns a tuple so you will need to convert this tuple into a bag before FLATTENing.

reo katoa
  • 5,751
  • 1
  • 18
  • 30