Build a query using LINQ
Overview
Instead of using the Devo interface, queries can also be directly written using LINQ language.
LINQ is the query language used by Devo to query data tables. LINQ syntax is very flexible as it allows to make a query expression very close to the data discovery process by:
selecting the source data table (usingÂ
from
)filtering data (usingÂ
where
)creating new fields (usingÂ
select
 and optionallyÂas
...)grouping the data by a time value (usingÂ
group every
 andÂevery
)applying aggregation operations over the grouped data (usingÂ
select
...Âas
...)
from <table name>
group every <server period> by <field1>, <field2>
every <browser period>
select <aggregation operation 1>(<field>) as <NewfieldName1>,
<aggregation operation 2>(<field>) as <NewfieldName2>,
For example, the following is a LINQ query where we want to retrieve only those events with status code 404 grouped every 10 minutes, displaying the method and clientIpAddress fields. Additionally, we have created the myCount field to count the records in each interval. For more examples using different operations, see the LINQ query examples section.
from demo.ecommerce.data
where statusCode = 404
group every 10m by method, clientIpAddress
every 10m
select count() as myCount
There are two different ways of accessing the query editor, where you can write your LINQ query:
In Data Search → Explore Your Data → Free Text Query. Learn more about this option here.
After accessing a data table, you can build and edit the query by selecting the Query code editor icon in the query toolbar and clicking Run.
LINQ clauses
Find below a description of each of the general LINQ clauses you can use to query your data.
Â