Dict operators - Latest

Data360 Analyze Server Help

Product type
Software
Portfolio
Verify
Product family
Data360
Product
Data360 Analyze
Version
Latest
Language
English
Product name
Data360 Analyze
Title
Data360 Analyze Server Help
Copyright
2024
First publish date
2016
Last updated
2024-11-28
Published on
2024-11-28T15:26:57.181000
CAUTION:
This topic relates to Data360 Analyze Script which is the language that is used in some deprecated nodes. If you are looking for help configuring the Python-based nodes, see Python scripting.

dict

Creates a dict.

Used in the following format, where key and value may be one or more expressions:

dict({key}, {value}*)

The elements of the dict may be any type.

Examples

Takes an even number of parameters dict(1 "a", 2, time(9, 30, 0)) # value { 1 -> "a" 2 -> 9:30:00 }

dictRetrieve

Lookup value in dict. If key is not found, and no default is specified, an exception will be thrown which should result a node error.

Used in the following format, where key may be one or more expressions, dict is the name of a dict to retrieve values from and default is the default value if key is not found:

dictRetrieve(dict1, key, {default})

dict1.dictRetrieve(key, {default})

The return value type varies.

Examples

exampleDict = dict("a", 1, "b", 2)dictRetrieve(exampleDict, "a", null) exampleDict.dictRetrieve("a", null)

dictStore

Set value associated with key in the hash in the returned dictionary.

Used in the following format, where key may be one or more expressions, dict is the name of a dict to retrieve values from and value is the value to insert into the dict:

dictStore(dict1, key, {value})

dict1.dictStore(key, {value})

The return value type varies.

Examples

dict1 = dictStore(dict0, "a", 3) // dict0 is unchanged, dict1 contains the new value. dict1 = dict0.dictStore("a", 3)

hashCode

Returns a hash value for a given value.

Used in the following format, where param must be a value:

hashCode(param)

param.hashCode()

The return value type is an integer.

Examples

hashCode('MyColumn') # value: 83452394 'MyColumn'.hashCode() # value: 83452394

hashCode(list('MyColumn', 'MyOtherColumn')) # value: 32423285 list('MyColumn', 'MyOtherColumn').hashCode() # value: 32423285

inDict

Returns true if the specified key is in the dict, false otherwise.

Used in the following format, where key may be one or more expressions and dict is the name of a dict to retrieve values from:

inDict(dict, key)

dict.inDict(key)

The return value type is a Boolean.

Examples

exampleDict = dict("a", 1, "b", 2)inDict(exampleDict, "a") exampleDict.inDict("a")