Open adatzer opened 3 years ago
I think having a list of errors in addition to a JSON array of the bad rows would definitely be useful. Having the complete JSON of the bad rows also opens up the bad endpoint to having some ability to filter in the same way that you can filter on good - only in this case you be able to filter on schema_violations, tracker_protocol_violations etc.
I'd also be tempted to standardise some of the JSON response that is returned back
e.g., for /micro/good
, event.rawEvent
is equivalent to event.collectorPayload
in /micro/bad
Possibly a duplicate of https://github.com/snowplow-incubator/snowplow-micro/issues/14 ?
This issue is about potential improvements to the bad row output in Snowplow Micro.
Is your feature request related to a problem? Please describe.
Currently, the response format of
/micro/bad
endpoint is a JSON array of BadEvents.The
errors
parameter of a BadEvent is a list of strings:The problem is that users need to parse the json-escaped string in order to get to the actual error that resulted to a failed event. In addition, the compact BadRow already contains information also shared in the other BadEvent's parameters (
collectorPayload
andrawEvent
).Improving the bad row output of Micro will also improve the user experience and at the same time provide the necessary information without loss or duplication.
Describe alternatives you've considered
Solutions we've considered so far in discussions (cc @paulboocock , @istreeter ) include:
errors
to be a list of messages, not a list of json-escaped bad rows./micro/bad
to respond with a JSON array of BadRows instead.