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

How about a Preview for Metadata? #2484

Closed
nsulikowski opened this Issue Feb 8, 2019 · 6 comments

Comments

Projects
None yet
3 participants
@nsulikowski
Copy link

nsulikowski commented Feb 8, 2019

something like this?
DataDebuggerPreview Preview(this Metadata metadata, int maxRows = 100)

@rogancarr

This comment has been minimized.

Copy link
Contributor

rogancarr commented Feb 9, 2019

@nsulikowski Can you give a little more detail about what you're looking for?

We currently have IDataView.Preview(int nRows) to preview the first N rows in a dataset (example). In the debugger, you can also inspect the IDataView objects to see their schema and metadata.

@nsulikowski

This comment has been minimized.

Copy link
Author

nsulikowski commented Feb 9, 2019

Preview is great for debugging, but I also find myself using it outside debugging, to inspect data quickly.
It'd be nice to have the same quick access for Metadata. I know I can use the raw api to do it myself, but it takes quite a bit of code due to the getter methods. Makes sense?

@rogancarr

This comment has been minimized.

Copy link
Contributor

rogancarr commented Feb 9, 2019

I see what you're saying now.

@eerhardt @TomFinley Related to IDataView API discussion yesterday. What do you think about this?

@nsulikowski Can you give a concrete example of use? It would help to guide the discussion.

@TomFinley

This comment has been minimized.

Copy link
Contributor

TomFinley commented Feb 11, 2019

I believe metadata for schema displays well in the debugger on DataViewSchema objects? If it does not, then that should be added, certainly.

Regarding a more general "previewer" I am less certain. We ourselves have directly applied this API and the code behind it internally in multiple products, and in each we have the problem of how to display "previews" of the data (including metadata), and we write up different solutions each time because what is appropriate in that instance is strongly application and scenario dependent. I have absolutely no idea what preview would be found useful under these circumstances. Formatted how? Human readable? Machine readable? You yourself @rogancarr asked for clarity on what exactly would be useful. This is a pretty solid sign that it does not belong in the core API.

It also strikes me as being basically a special case of the classical problem of why making structured ToString is one of the most pernicious blunders an API can make, if their goal is to have an API without breaking changes.

So, I think we should approach this the same way most libraries do. (Indeed, even the .NET libraries. See how useful the result of List<T>.ToString() is. 😉 This is not accidental.) We generally don't write client code for our library (except targeted scenarios directly related to developing with that library, by which I mean obviously our debugger display helpers), but we write our API in such a way that people can write client code.

@nsulikowski

This comment has been minimized.

Copy link
Author

nsulikowski commented Feb 12, 2019

I guess I didn't realized that metadata doesn't have a specific format. Preview might not necessarily make sense. Thanks for the clarification

@rogancarr

This comment has been minimized.

Copy link
Contributor

rogancarr commented Feb 12, 2019

Thanks for starting the conversation @nsulikowski ! It's always good to think through these things, especially as we get ready for the 1.0 of these APIs. I'll mark as closed, but feel free to re-open if you have any more thoughts on this.

@rogancarr rogancarr closed this Feb 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment