Document toolboxDocument toolbox

URI fragment (urifragment)

Description

Extracts the URI fragment in a URI, if exists. When a URI does not have fragment, the new column returns null. See this article to learn more about URI syntax.

How does it work in the search window?

Select Create column in the search window toolbar, then select the URI fragment operation. You need to specify one argument:

Argument

Data type

Argument

Data type

URI mandatory

string

The data type of the values in the new column is string.

Example

We want to get the fragment part of the URIs in our referralUri column. To do it, click Create column and select the URI fragment operation. The arguments needed are:

  • URI - referralUri column

Click Create column and you will see the following result:

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 URI fragment operation:

  • urifragment(uri_string)

Example

You can copy the following LINQ script and try the above example on the demo.ecommerce.data table. 

from demo.ecommerce.data select urifragment(referralUri) as URI_fragment