Create new streams by using extractjsonfield

Hi everyone!

In the execution of this create stream statement the type column is always null:

create stream events_enhanced as 
select extractjsonfield(event, '$["$type"]') as type 
from events 
where event is not null emit changes;

When instead I execute the same statement as a push query the type column value is not null:

select extractjsonfield(event, '$["$type"]') as type 
from events 
where event is not null emit changes;

Do I need to escape in some way the content?

Thanks

Hi @i-arge , what version of ksqlDB are you using?
Could you post some instruction to reproduce the error?

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.