Search code examples
azure-stream-analytics

Error when trying to filter input in stream job query


I get the following error when trying to run the query. My goal is to filter the JSON input to be sure only valid events get through. Any thoughts on how i can achieve that?

"Comparison is not allowed for operands of type 'bigint' and 'nvarchar(max)' in expression 'event . Action < > '''."

SELECT
* 
INTO 
   [output]
FROM 
    [input] event 
WHERE
      event.Name <> ' '

Solution

  • With some more research i realized that the value wasn't a string so the following cast made the trick.

    CAST(event.Name AS nvarchar(max)) <> ''