nteract: Rendering of "application/vnd.dataresource+json" broken
As far as I can tell this notebook should render properly. Note that it has a application/vnd.dataresource+json payload.
When I run it or open it in nteract, I get:

This is on nteract 0.11.9 on Windows.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 16 (11 by maintainers)
Commits related to this issue
- Allow support for any kernel language - [This issue](https://github.com/nteract/nteract/issues/3491) reminded me to make this package language agnostic — committed to BenRussert/data-explorer by BenRussert 5 years ago
- Add range index to dataset by default if primaryKey missing from schema - fixes #3491 — committed to BenRussert/nteract by BenRussert 5 years ago
- Add range index to dataset by default if primaryKey missing from schema - fixes #3491 — committed to BenRussert/nteract by BenRussert 5 years ago
Based in discussion in the weekly meeting, the todos for the data-explorer package here are:
Make
primaryKeyan optional propertyPotentially add some schema validation that provides a useful error message if there is a problem.
Great, thanks a lot!
I’m going to try to repro and look into this morning, here is my hypothesis:
I can tell from above that IJulia is returning a bundle with the proper dataresource key, but nteract/data-explorer can’t parse the data. either, 1.) IJulia is not providing the proper data resource format of the data set. or 2.)
data-exploreris not handling the data properly (maybe treating an optional key as required)Here is how we type the data payload in
data-explorerbased on the data resource spec:Example from the iris dataset:
Once we get out from under our typescript conversion muck, I want to take a full look at this. 😬
Thanks @BenRussert for taking a look at this.
Ah, yes, if I edit the file manually and add that, it works!
But, looking at the spec here (and in particular the “Primary Key” section), it seems pretty clear that this field is optional, right? I also wouldn’t know what to put there: many tables don’t have a primary key, and adding a column that just has row numbers seems also undesirable, because then the grid would show a column that doesn’t even exist in the source data, right?
It seems to me that right thing to do here is to make data-explorer be able to handle cases where there is no
primaryKeyfield. I think it actually did in the past, because there was a time when all of this worked, and I didn’t change anything in the meantime on the julia side.