dump map (a,b,c,d)
Group |
Logs the keys and their values of a Named Map a into the Lobster_data log if b is true. The return value is the number of elements being logged or -1 if no logging has taken place or the dump of the map (see parameter d).
This function is mainly used during the development of the profile.
Note: Please note that this function writes 'hidden' values into the log like 'real' values. See the explanations for the Empty Flag.
Description of Parameters
Parameter |
Description |
a |
Name of the map. |
b |
Must be true for the dump to be executed. |
c |
If true, the dump is performed to the additional info, instead of to the normal job log. Default: false. |
d |
If true, the dump of the map is returned if there was a dump, otherwise, an empty string. If false, the number of map elements is returned if there was a dump, otherwise, -1. Default: false. |
Examples
Assume a map MyMap with elements {key1=val1, key2=val2, key3=val3}. The system variable VAR_IS_TEST has value true, the system variable VAR_IS_NOT_TEST has value false.
Parameter a |
b |
c |
d |
Result |
Dump |
MyOtherMap |
false |
|
|
-1 |
No. |
MyOtherMap |
true |
|
|
-1 |
No. |
MyMap |
Variable: VAR_IS_NOT_TEST |
|
|
-1 |
No. |
MyMap |
Variable: VAR_IS_TEST |
|
|
3 |
Yes. |
MyMap |
true |
|
true |
'key1'='val1' |
Yes. |
In the last case, the following is logged to the Lobster_data log.
[M:] Dump of map MyMap:
'key1'='val1'
'key2'='val2'
'key3'='val3'
Due to technical reasons, the order of the keys in the logs is random.
See Also
add to inheritance-map(key a, value b, name of map c, inheritance level d, regex for empty e)
csv-into-map(file a, [mapname b], [keycol(s) c], [csv delim d], [csv encoding e], [clear first f])
fill-map-from-fields( map a, prefix b, index c, hidden d, [processing e] )
get value from map(key a, name of map b, delimiter c, item d)
increase map value(key a, value b, map name c, skip empty d)
select into map(a,b,[param &1 = c], d,e, f,g,h,i,j], delimiter k, map l, m)