Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DEV and version next

...

ColAColBColC
This my String ThatabXcdXefXgh01AA001
my string This ThatijXklXmnXop02BB002
This That My StringqrXstXuvXwy03CC003

TransformTransformation:

ColA: You can use the following transform transformation to split on the variations of My String: In this case, the ignoreCase parameter ensures that all variations on capitalization are matched:

d-

...

trans
RawWrangletrue
p03Value'My String'
Typestep
WrangleTextsplit col:ColA on:'My String' ignoreCase:true
p01NameColumn
p01ValueColA
p02NameOption
p02ValueOn pattern
p03NameMatch pattern
p04Valuetrue
p04NameIgnore case
SearchTermSplit column

ColB: For this column, the letter x is the split marker, and the data is consistently formatted with three instances per row:

d-

...

trans
RawWrangletrue
p03Value'X'
Typestep
WrangleTextsplit col:ColB on:'X' limit:3
p01NameColumn
p01ValueColB
p02NameOption
p02ValueOn pattern
p03NameMatch pattern
p04Value3
p04NameNumber of matches
SearchTermSplit column

ColC: In this column, the double-letter marker varies between the rows. However, it is consistently in the same location in each row:

d-

...

trans
RawWrangletrue
p03Value2,4
Typestep
WrangleTextsplit col:ColC at:2,4
p01NameColumn
p01ValueColC
p02NameOption
p02ValueSequence of positions
p03NamePositions
SearchTermSplit column

Results:

When the above transforms are added, the source columns are dropped, leaving the following columns:

...