isstring

This page explains how to use the isstring function in APL.

Use the isstring function to determine whether a value is of type string. This function is especially helpful when working with heterogeneous datasets where field types aren’t guaranteed, or when ingesting data from sources with loosely structured or mixed schemas.

You can use isstring to:

  • Filter rows based on whether a field is a string.
  • Validate and clean data before applying string functions.
  • Avoid runtime errors in queries that expect specific data types.

Usage

Syntax

isstring(value)

Parameters

NameTypeDescription
valueanyThe value to test for string type.

Returns

A bool value that’s true if the input value is of type string, false otherwise.

Use case example

Use isstring to filter rows where the HTTP status code is a valid string.

Query

['sample-http-logs']
| extend is_string = isstring(status)
| where is_string

Run in Playground

Output

_timestatusis_string
2025-06-05T12:10:00Z"404"true

This query filters out logs where the status field is stored as a string, which can help filter out ingestion issues or schema inconsistencies.

  • isimei: Checks whether a value is a valid International Mobile Equipment Identity (IMEI) number.
  • isreal: Checks whether a value is a real number.
  • iscc: Checks whether a value is a valid credit card (CC) number.
  • isutf8: Checks whether a value is a valid UTF-8 encoded sequence.

Other query languages