Table of Contents | ||||
---|---|---|---|---|
|
Description
Adds a new column field that returns the addition or concatenation of the given elements. Depending on the input data types, this operation can be used in different ways:
...
How does it work in the search window?
Select Create column field in the search window toolbar, then select the Addition, sum, plus / Concatenation operation. You need to specify at least two arguments:
Argument | Data type | ||
---|---|---|---|
Add / Concat mandatory | float, integer, timestamp, duration, string If you introduce a string data type in both arguments (Add and plus), the Add argument will be renamed as Concat. | ||
plus mandatory | float, integer, timestamp, duration, string You can add as many plus arguments as required, unless you use a timestamp data type, which allows only one. | ||
|
The data type of the new column field values can be float, integer, duration, timestamp, or string, depending on the arguments selected. See Description section above for the list of combinations and output data types.
Example
In the demo.ecommerce.data
table, we want to add 300 to all the values in the bytesTransferred columnfield. To do it, create a new column field using the Addition, sum, plus / Concatenation operation. Let's call the new column field bytesTransferred+300
The arguments needed to create the new column field are:
Add - bytesTransferred columnfield
plus - Click the pencil icon and enter 300
...
Click Create columnfield and you will see the following result:
...
Use the operator select
... as
... and add the operation syntax to create the new columnfield. These are the valid formats of the Addition, sum, plus / Concatenation operation:
number1 + number2 +...
duration1 + duration2 +...
timestamp + duration
string1 + string2 +...
add(number1, number2,...)
add(duration1, duration2,...)
add(timestamp, duration)
add(string1, string2,...)
Info |
---|
Using this operation in Activeboards Be aware that using this operation in Activeboards presents an important limitation: the number of arguments is limited to two. As a workaround, you can perform subsequent adding operations until you have added all the arguments you need. Visit this article for more syntax differences between the Search Window and Activeboards. Workaround example → |
Example
You can copy the following LINQ scripts and try the above example on the demo.ecommerce.data
table.
Code Block |
---|
from demo.ecommerce.data select bytesTransferred + 300 as `byesTransferred+300` |
...