Skip to content

Auto-detect tabular data from command outputs #1608

Closed
@waldyrious

Description

@waldyrious

This is likely something that has been discussed already, and parts of it may even be already implemented, but since I couldn't locate a discussion in the issue tracker, I thought I'd open an issue myself.

I understand that the current strategy of Nushell is to provide commands that output structured data, and offer a way for other commands to do so as well so that Nushell can integrate them within rich pipelines. I am not sure how much of this is expected to remain explicit, though — the 0.12 release post mentions inference of data types:

We’ve been hard at work at improving how we read in unstructured data. In this release, you’ll see the beginning of type inference as data is read in.

...but beyond individual data points, I suppose the long term ambition is to be able to also infer the structure of unstructured data, right? So I suppose that would look like the ability to automatically detect tab-separated output, or space-aligned values, or even interpret common types of ASCII or Unicode tables (such as those built with box-drawing characters), and seamlessly convert them to structured data Nushell can work with.

I know that this is already possible when opening structured files that Nushell knows how to recognize, as described in #1018:

You can use open some_excel_file.xlsx and it will do the import automatically. from-xslx is the command it will call for you (rather than having to do it manually)

So to be clear, I'm talking about inferring structure from the stdout of regular commands, like this one, or this one, or #619, or #443.

Is this part of the roadmap? Is this described or discussed elsewhere in more detail? To me it sounds like a crucial piece to allow Nushell to take off and integrate with existing tools; manually implementing structure-friendly versions of commands, as was done with ls, ps, etc., doesn't seem as scalable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    delightthis feature would delight usersenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions