labelling different lines on split operation
Asked Answered
A

1

6

I am using split on 1 of my fields.

It is split into different lines.

enter image description here

If I use .label('something'), then each line has the same name. but I want to give each line a different name.

How to label each line with different name ?

Amphibious answered 11/8, 2017 at 7:9 Comment(0)
Z
11

You need to use the regex functionality of .label

Try this:

.label("Ride ID: $1", "^.* > ride_id:(.+) > .*")

The $1 will be replaced by the first argument in the regex, ride_id:(.+) so you should end up your key labels as:

Ride ID: 4
Ride ID: 54
Ride ID: 5
Ride ID: 14
Ride ID: 50
Zerlina answered 19/9, 2017 at 16:0 Comment(1)
Works wonderfully. Here is my application of the example: .label(label="$1", regex="^.* > app.keyword:(.+) > .*") (v.6.5.4)Chandelle

© 2022 - 2024 — McMap. All rights reserved.