Document toolboxDocument toolbox

URI port (uriport)

Description

Extracts the port number from a URI.

How does it work in the search window?

Select Create field in the search window toolbar, then select the URI port 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 field is integer.

Example

In the demo.ecommerce.data table, we want to get the path of the URIs in our referralUri field. To do it, click Create field and select the URI port operation. The arguments needed are:

  • URI - referralUri field

Click Create field.

How does it work in LINQ?

Use the operator select... as...  and add the operation syntax to create the new field. This is the syntax for the URI port operation:

  • uriport(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 uriport(referralUri) as URI_port