Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Expand
titleWatch video tutorial: Devo Query Lookups
Widget Connector
overlayyoutube
_templatecom/atlassian/confluence/extra/widgetconnector/templates/youtube.vm
width600px
urlhttps://www.youtube.com/watch?v=2M_wa-EtRrctK0NZPDSTMU
height300px
Expand
titleWatch video tutorial: Time Range Lookups
Widget Connector
overlayyoutube
_templatecom/atlassian/confluence/extra/widgetconnector/templates/youtube.vm
width600px
urlhttp://youtube.com/watch?v=oSLJ4KbBO8s
height300px
Table of Contents
minLevel1
maxLevel2
typeflat

What permissions do I need?

To be able to view and use lookup operations when working in the search window, you need to have at least view permissions on Lookups the View version of the Lookups permissions for upload lookups or the Query lookups permission for query lookups. Take into account that these Having the User resources permission is equivalent to having the Manage version of these two permissions.

These two permissions are hierarchy-based, meaning you need to have Lookups assigned in order to be able to have Query lookups.

...

Additionally, . Notice at least the View version of the Finders permission is required to enable the Lookup permission (know more about permissions here).

Additionally, if you’re not the owner of the lookup, you need to receive at least View access to the lookup in question via sharing, otherwise, you will not be able to see it or use it. Check Share lookups to know more.

...

Using lookup operations in the search window 

You can run a search and correlate its content with values from a lookup table. If any value in the key field of the lookup table is also present in your query, the corresponding values of the selected lookup field will be added to a new field.

...

Rw ui steps macro
Rw step

Go to Data search and open a data table (in this case demo.ecommerce.data).

Rw step

Click Create field in the query toolbar and give it a meaningful name. You will create two new fields: IP_Street_Address and IP_Brand.

Rw step

Select the operation of the field you want to add based on the IP_List lookup (in these cases StreetAddress and Brand).

Rw step

Status
colourBlue
titleLookups:
Add the clientIpAddress argument when creating the IP_Street_Address field.

Status
colourBlue
titleTime range Lookups:
Add a second argument with timestamp values (not in this example).

Rw step

Click Create field and the new two fields will be added at the end of the table.

Using lookup operations in LINQ

You can also add lookup values by using the corresponding LINQ syntax to correlate query content with values from a lookup table. If any value in the key field of the lookup table is also present in your query, the corresponding values of the specified lookup field will be added to a new field.

...

Note

Lookups in Activeboards and APIs

The syntax to use lookup operations in Activeboards and APIs is different. Visit the following articles to know more: LINQ syntax differences: Activeboards vs search window, LINQ syntax differences: Devo APIs vs search window.

Lookup operations result

When using a lookup operation, both the key field specified in the lookup when created and the field specified as an argument in the operation are searched for matching values. When they are found, the corresponding value of the lookup field selected as the operation will be added to the new field.

In the example above, both fields are created with the lookup values, showing the street and printer brand corresponding to the IPs of the clientIpAddress field that are also in the key field of the lookup table. These fields will show null for those IPs that are not included in the lookup table.

Add all the values in a row

When a match is found between the content of your query and a value in your lookup key field, you can select the Whole entry of... operation to add all the values in that lookup row as a JSON object in a new field.

...

Rw ui tabs macro
Rw tab
titleIn the search window

The process is essentially the same as the standard one explained above except for the operation selected, which must be Whole entry of…

Image RemovedImage Added
Rw tab
titleUsing LINQ

You can also add lookup rows as JSON objects by using the corresponding LINQ syntax in the query.

To do it, you can either use the Free Text Query to open the search from the beginning or open the Query code editor if you have it already open. This is the syntax you need to use:

select `lu/lookupName`(tableField) as newfieldName

Info

Syntax special considerations

  • tableField → this must be the field in your data table that corresponds to the lookup key field, otherwise there will be no match to correlate your data and you will get null for all events.

You can then split the resulting JSON objects into their different key/value pairs and transform them into different data types using the operations in the JSON group.