BRAINscript changes - Data360_Analyze - 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
Tip: BRAINscript is also known as "Script" in Data360 Analyze, see Terminology changes.

It is recommended that you begin using the new script-free nodes, such as the Filter, Sort and Aggregate nodes. If you need to use scripting for advanced use cases, you can use Python script to further tailor these nodes.

If you are still using deprecated nodes in your graphs while you begin to transition to use the new Python-based nodes, it is important to be aware of the following changes to the BRAINscript language in Data360 Analyze compared to LAE:

Feature Description

Unless operator

The unless operator is no longer supported; instead, you can use if then else to achieve the same results.

For example:

errorRatio = badResultsCount / totalCountunlesstotalCount == 0then0

This script would now be written using if then else, as follows:

if totalCount == 0thenerrorRatio = 0else errorRatio = badResultsCount / totalCount

Emit/exclude wildcard

Emit/exclude wildcard now fails if you use u", r", ur", ru" style strings. Previously, using these strings would produce incorrect results. This affects emit and exclude statements in the following formats:

  • emit wildcard u"<someString>"
  • emit wildcard r"<someString>"
  • emit wildcard ur"<someString>"
  • emit wildcard ru"<someString>"
  • exclude wildcard u"<someString>"
  • exclude wildcard r"<someString>"
  • exclude wildcard ur"<someString>"
  • exclude wildcard ru"<someString>"

Emit wildcard with \x, \u style escapes now correctly passes these through to expert where they are evaluated correctly. Previously, the backslash character was stripped when sending to expert, so \x10 rather than matching the newline (\n) character would match the literal string "10".

Emit x as y

Previously, the following two examples would output the value of x under the column name y:

x=3emit x as y

x=3y=2emit x as y

Now, the second example would fail because y has been defined as a variable. The first example would still work because y has not been declared as a variable, so the column name is output as the literal value of "y".

a==b

Statements such as a==b will now error if they are used as a top level statement. However, it is possible to use this type of statement in a comparison context, for example:

if (a==b) thendo something

group* macros

The way that groupCount, groupMax, groupMin, groupSum, groupString macros behaves has changed. In general, this will lead to fewer problems with macro usage and reduces the restrictions on when they can be used.

evalIf

The first parameter of an evalIf statement can be either a boolean literal, or a boolean expression, for example, "or", "not", "and", parenthesis "(",")" logical operators are allowed, as are the "==" and "!=" comparators.

If you want to use the comma-notation (',') within emit, exclude, or rename statements in the context of an evalIf, the evalIf argument within which it is used must be wrapped in curly braces {}

For example:

evalIf(true, {emit "foo" as "Bar"}, {emit "barry" as "mary"})

do output

The do output statement can now be used to specify output names, as well as numbers.

setSuccessReturnCode

The 203 return code is no longer supported.

203 - Any nodes wired to the output will not execute, but any nodes wired to this node's outclock, or any of the outclocks of any nodes wired to this node's output will trigger. This behavior allows for this node to prevent other nodes from executing on the data, but to allow nodes clocked to a higher composite to still execute as if all nodes were executed.

Deprecated script functions

If you enter a BRAINscript function that is not recognized, but it is recognized by Expert, then it will still work, however the node will report a warning about the unrecognized function.