zui icon indicating copy to clipboard operation
zui copied to clipboard

Allow specification of input format when the user knows it or auto-detect fails

Open philrz opened this issue 1 year ago • 1 comments

In #1913, @jameskerr remarked:

I'd love a dialog that asks the user which format their data is in to pass to zed load. I've got a csv that it thinks it's zson so it fails with a strange error.

A possible workflow is:

Import the file

  1. If there is an auto detect error, prompt the user for the type of file
  2. It would also be nice to give a summary of what the auto detect detected.

Since users may sometimes know their format in advance, I'd also recommend we offer them the ability to explicitly specify the format on the first try. For instance, https://github.com/brimdata/zed/issues/3865 describes the perils of trying to send certain JSON through the auto-detector. If a user works with this kind of JSON a lot, they'd surely appreciate a way to avoid the failure round-trip.

In conclusion, maybe the "prompt" in @jameskerr's list above could be some kind of pull-down list of the supported formats, with "Auto-detect" as the default. Then if the auto-detect fails, the same list could be offered again.

Also, the "summary of what the auto detect detected" exists today as something like this:

image

When looking at this while pretending to be a new user, I admit this could be somewhat confusing, since it's not immediately obvious that each line represents why it failed to auto-detect as that format.

philrz avatar Aug 23 '22 01:08 philrz

Cool, thank you

jameskerr avatar Aug 23 '22 18:08 jameskerr