Jq filter compilation (jqcompile)
Description
Compiles a jq filter to be used as an argument of the Jq evaluation (jqeval) operation. For information about jq filters, see the jq online documentation.
How does it work in the search window?
Select Create column in the search window toolbar, then select the Jq filter compilation operation. You need to specify one argument:
Argument | Data type | Description |
---|---|---|
Filter (mandatory) | string | The filter to locate the part of the json syntax from which to extract the data. You can manually enter the string or select a column with string data type. For a successful extraction using it as an argument in the Jq evaluation (jqeval) operation, the jq filter specified must coincide with the name of an item inside the intended JSON and must start with a dot operator (.) – jq filters always start with a dot. |
The data type of the values in the new column is jq.
Example
In this example, we will create a jq filter to locate a specific item inside a JSON, which can be later used as an argument in the Jq evaluation (jqeval) operation.
Click the Create Column button on the toolbar, select the Jq filter compilation (jqcompile) operation and give the new column a name.
Add the necessary argument and configure it as shown in the picture below:
jq → manually introduced →  .city
Click Create Column and a new column will be created with the specified jq filter.
Now you have your new column ready to use as an argument in the Jq evaluation (jqeval) operation.
How does it work in LINQ?
Use the operator select
... as
... and add the operation syntax to create the new column. This is the syntax for the Jq filter compilation operation:
jqcompile(.string)
Example
You can use the following LINQ script to recreate the example above in any table (for example, in demo.ecommerce.data
):
from demo.ecommerce.data
select jqcompile(".city") as jqFilter