Document toolboxDocument toolbox

LINQ syntax differences: Devo APIs vs search window

Due to architectural differences, the LINQ syntax presents some particularities in the Devo APIs and the search window of the Devo app.

Therefore, keep in mind that copying a LINQ query from the search window and pasting it into an API request, or vice versa, might not work. Before examining the differences explained below, you can visit Build a query using LINQ to know the standard procedures when working with LINQ.

Alerts API

Note that due to technical reasons, the Alerts API is the only API that uses the LINQ syntax used in the search window of the Devo app. This is indicated in the different sections below.

Addition, sum, plus / Concatenation (add, +) operations

When you use this operation in the Data Search, you can add as many arguments as needed (where applicable), however, the number of arguments is limited to two when used in APIs.

As a workaround, you can perform subsequent adding operations until you have added all the arguments you need.

Search window + Alerts API

Other Devo APIs

Search window + Alerts API

Other Devo APIs

Syntax:

Create field: select add(value1, value2, value3, value4...) as totalField

 
Query example:

from demo.ecommerce.data select add(bytesTransferred, timeTaken, statusCode) as `totalField`

Syntax:

Create field: select add(value1, value2) as totalFieldA, add(totalFieldA, value3) as totalFieldB, add(totalFieldB, value4) as totalFieldC...

Query example:

from demo.ecommerce.data select add(bytesTransferred, timeTaken) as totalFieldA, add(totalFieldA, statusCode) as totalFieldFinal

Related articles: Addition, sum, plus / Concatenation (add, +)

Maximum (max) operations → create field

When you use this operation in the Data Search to create a new field, you can add as many arguments as needed, however, the number of arguments is limited to two when used in APIs.

As a workaround, you can perform subsequent maximum operations until you have obtained the maximum of all the arguments you need.

Search window + Alerts API

Other Devo APIs

Search window + Alerts API

Other Devo APIs

Syntax:

Create field: select max(value1, value2, value3, value4...) as maxField

 

Query example:

from demo.ecommerce.data select max(bytesTransferred, timeTaken, statusCode) as `maxField`

Syntax:

Create field: select max(value1, value2) as maxFieldA, max(maxFieldA, value3) as maxFieldB, max(maxFieldB, value4) as maxFieldC...

Query example:

Related articles: Maximum (max)

Minimum (min) operations → create field

When you use this operation in the Data Search to create a new field, you can add as many arguments as needed, however, the number of arguments is limited to two when used in APIs.

As a workaround, you can perform subsequent minimum operations until you have obtained the minimum of all the arguments you need.

Search window + Alerts API

Other Devo APIs

Search window + Alerts API

Other Devo APIs

Syntax:

Create field: select min(value1, value2, value3, value4...) as minField

 
Query example:

Syntax:

Create field: select min(value1, value2) as minFieldA, min(minFieldA, value3) as minFieldB, min(minFieldB, value4) as minFieldC...

Query example:

Related articles: Minimum (min)

Mlevalmodel operation

mlevalmodel operation is not supported in search window. Use this operation in APIs when you want to work with models you uploaded in Model Management.

Search window

Devo APIs

Search window

Devo APIs

Not supported

Query examples:

Example:

Refer article: Model Management

Multiplication, product (mul, *) operations

When you use this operation in the Data Search, you can add as many arguments as needed, however, the number of arguments is limited to two when used in APIs.

As a workaround, you can perform subsequent multiplication operations until you have multiplied all the arguments you need.

Search window + Alerts API

Other Devo APIs

Search window + Alerts API

Other Devo APIs

Syntax:

Create field: select mul(value1, value2, value3, value4...) as resultField


Query example:

Syntax:

Create field: select mul(value1, value2) as resultFieldA, mul(resultFieldA, value3) as resultFieldB, mul(resultFieldB, value4) as resultFieldC...

Query example:

Related articles: Multiplication, product (mul, *)