Build a query using LINQ
Instead of using the Devo interface, queries can also be directly writen 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
- filtering data (using where)
- creating new columns (using
- grouping the data by a time value (using
- applying aggregation operations over the grouped data (using
For example, the following is a LINQ query where we want to retrieve only those events with status code 404 grouped each 20 minutes, displaying the method and clientIpAddress columns. Aditionally, we have created the myCount column to count the records in each interval. For more examples using different operations, see the LINQ query examples section.
There are two different ways of accessing the query editor, where you can write your LINQ query:
- In Data Search → Finder → Free Text Query. Learn more about this option here.
- After accessing a data table, you can build and edit the query selecting the Toggle Query Editor icon in the query toolbar and clicking Run.
The following articles include the LINQ expressions you must use to perform every single type of operation in Devo:
- Filter data using LINQ
- Group data using LINQ
- Aggregate data using LINQ
- Create new columns using LINQ
- LINQ query examples