brimdata / zed

A novel data lake based on super-structured data
https://zed.brimdata.io/
BSD 3-Clause "New" or "Revised" License
1.38k stars 67 forks source link

Debug operator #5196

Closed mattnibs closed 1 month ago

mattnibs commented 2 months ago

This commit introduces the debug operator- an operator intending to help debugging complex queries. When running the debug operator using zq or zed all encounterd values at the point of the operator are written to stderr.

Closes #5181

mattnibs commented 1 month ago

@philrz and I talked about extending the Zed syntax so you can specify a channel other than "debug". We both think that's a good idea since Zui will eventually be able to display channels separately but we can add it later.

Is this different than using the output operator?

nwt commented 1 month ago

@philrz and I talked about extending the Zed syntax so you can specify a channel other than "debug". We both think that's a good idea since Zui will eventually be able to display channels separately but we can add it later.

Is this different than using the output operator?

Yes, in two regards. First, it includes an expression (e.g., debug some_channel some.path). And second, it doesn't have output's "read to EOS" behavior.