How to make sure that a particular column value has four characters in Kusto?

Viewed 58

I am having the records as a single space-separated string. So I am parsing them and ingesting them into the target table using the update policy. However, I want to check some conditions like make sure if a column value(string) has a length of 4 and if not, drop it from ingesting. Is it possible to add such checks in the update policy function in Kusto?

1 Answers

Sure, it's possible. Just add a where operator in the update policy query, for example:

.create function 
MyUpdateFunction()
{
    MyTableX
    | where strlen(SomeStringColumn) >= 4
}
Related