select_replaceΒΆ

select_replace() command replaces selected fields in stream. Keeps field order and other fields.

| select_replace(field1:expr, field2:expr, ...)

Example.

1
2
dual(3)
| select(t, ip, s, f)
t ip s f
2020-09-23 15:16:42.540 +0300 0.0.0.0 0ho0 0.0
2020-09-23 15:16:42.541 +0300 0.0.0.1 1ho1 1.0
2020-09-23 15:16:42.542 +0300 0.0.0.2 2ho2 2.0
1
2
3
dual(3)
| select(t, ip, s, f)
| select_replace(s:upper(s), f:100*f)
t ip s f
2020-09-23 15:18:38.807 +0300 0.0.0.0 0HO0 0.0
2020-09-23 15:18:38.808 +0300 0.0.0.1 1HO1 100.0
2020-09-23 15:18:38.809 +0300 0.0.0.2 2HO2 200.0