Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Description

You can apply this operation either as a Filter or Create column operation:

Filter

Filters string values that start with a specified prefix.

Create column

Creates a Boolean column that shows true for those strings that start with a specified prefix.

In both cases, the operation is case sensitive, so make sure the prefix contains lower and uppercase as needed. Otherwise, the results might not be as expected.

How does it work in the search window?

Select Filter / Create column in the search window toolbar, then select the Starts with operation. You need to specify two arguments:

Argument

Data type

String mandatory

string

Prefix mandatory

string

If you use the Create column operation, the data type of the values in the new column is boolean (true or false).

Example

In the demo.ecommerce.data table, we want to get only the events with cookie values starting with the letter gTo do it, we will apply a Filter using the Starts with operation.

The arguments needed for the filter are:

  • String cookie column

  • Prefix - Click the pencil icon and enter g

Click Filter data and you will see the following result:

Click Create column and follow the same steps to add a new Boolean column that shows true when the strings in the cookie column start with g.

How does it work in LINQ?

Use the operator where...  to apply the Filter operation and select... as...  to apply the Create column operation. These are the valid formats of the Starts with operation:

  • startswith(string1, string2_prefix)

Examples

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

from demo.ecommerce.data
  where startswith(cookie, "g")

And this is the same example using the Create column operation:

from demo.ecommerce.data
  select startswith(cookie, "g") as startswith_g
  • No labels