Loading

MERGE

gts

Merge several Geo Time Series™ together.

The MERGE function expects a LIST of Geo Time Series™ on the top of the stack. It will consume these GTS and push onto the stack a single GTS instance with all measurements found in the GTS instances present in the LIST. The name and labels of the resulting GTS instance are those of the first one of the LIST.

MERGE do not override values on the same timestamp, they are appenned.

MERGE is available since version 1.0.0.

Signatures

Examples

[ NEWGTS 'a' RENAME { 'label1' 'foo' } RELABEL 1000000 NaN NaN NaN 1.0 ADDVALUE 2000000 NaN NaN NaN 1.0 ADDVALUE 3000000 NaN NaN NaN 1.0 ADDVALUE 4000000 NaN NaN NaN 2.0 ADDVALUE 5000000 NaN NaN NaN 2.0 ADDVALUE NEWGTS 'b' RENAME { 'label3' 'bar' } RELABEL 1000000 NaN NaN NaN 2.0 ADDVALUE 7000000 NaN NaN NaN 3.0 ADDVALUE 8000000 NaN NaN NaN 4.0 ADDVALUE 9000000 NaN NaN NaN 4.0 ADDVALUE 10000000 NaN NaN NaN 4.0 ADDVALUE ] MERGE

Examples

a = NEWGTS() RENAME(a, 'a') RELABEL(a, { 'label1': 'foo' }) ADDVALUE(a, 1000000, NaN, NaN, NaN, 1.0) ADDVALUE(a, 2000000, NaN, NaN, NaN, 1.0) ADDVALUE(a, 3000000, NaN, NaN, NaN, 1.0) ADDVALUE(a, 4000000, NaN, NaN, NaN, 2.0) ADDVALUE(a, 5000000, NaN, NaN, NaN, 2.0) b = NEWGTS() RENAME(b, 'b') RELABEL(b, { 'label3': 'bar' }) ADDVALUE(b, 1000000, NaN, NaN, NaN, 2.0) ADDVALUE(b, 7000000, NaN, NaN, NaN, 3.0) ADDVALUE(b, 8000000, NaN, NaN, NaN, 4.0) ADDVALUE(b, 9000000, NaN, NaN, NaN, 4.0) ADDVALUE(b, 10000000, NaN, NaN, NaN, 4.0) return MERGE([a,b])