New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add debug output beyond "put: a referenced field is missing" #2331
Comments
We revisited this topic today in the era of Zed Lakes and some of the experience of the beta testers from the community. Something worth emphasizing is that despite the However, if the user had made a typo (let's say they'd typed For the simple |
Multiple changes have accumulated that have addressed this issue. First, the Circling back to the original example in this issue and verifying how it looks are current Zed commit 8bf604c, here's how the shaping looks in current syntax.
|
Repro is with
zq
commit 2897dd3.One of the quirks of how Zeek outputs NDJSON is that it will drop "unset" fields/records entirely rather than output them with explicit
null
values, such as we see in the following pair ofsmb_files
events where one containstimes
and one does not.I'm trying to shape this data. One of our quirks at the moment is that the only way to convert ISO timestamps into
time
type is to use theiso()
function. However, in this case an error message is produced for the one record wheretimes
was absent.This is easy to spot when working with just two records, but originally I was working with a giant shaping config that targeted lots of fields and I was also reading millions of lines of input. Therefore I just saw a flood of these
a referenced field is missing
errors and I wasn't sure if they were benign (like this one) or perhaps caused by a mistake on my part with perhaps having made a typo in a field name.In conclusion, it would have helped a lot if the debug output had been able to list the name(s) of the specific field(s) that were deemed "missing" and perhaps (optionally?) a way to see the entirety of the record it was missing from.
In discussing this with @mccanne, he imagined the ideal way to address this would be via a comprehensive "debug mode" that offered the detail via a stream of ZNG errors. However, he also imagined there might be something ad hoc we could do as a first step.
The text was updated successfully, but these errors were encountered: