-
Notifications
You must be signed in to change notification settings - Fork 4
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
[epic] Resource Schema (data dictionary) editor w/ infer #13
Comments
@abhishekgahlot @rufuspollock updates: I pushed this commit with the updates for to render a table with react-table.
Note: import-ui is using a different version of the react-table, if you need to check how the new version works, please check it in https://react-table.tanstack.com/docs/overview |
@mariorodeghiero we should use the recent react-table. The next step here is to make the editor where you can edit the table schema info i think ... |
- create a new state of the schema - add new css file - render the schema on the table - add input type text to be able to edit the state of the schema object
@anuveyatsu @rufuspollock I read and check the JSON schema editors available but I preferred to create my own and control the schema object via the state in react. The example is very simple yet but it works properly. Online in https://datopian.github.io/datapub/?path=/story/components-tableschema--default I think is important to decide one thing:
@rufuspollock what is the title? Do we need to use? Tomorrow I pretend to add select options to the user choose. |
Hi @mariorodeghiero this is cool 👏 Are you referring to this spec here https://specs.frictionlessdata.io/table-schema/#descriptor ? |
@mariorodeghiero great job. Note:
I agree we don't need json schema editors here - just build our own given how simple this. |
Hi @anuveyatsu I think we are up to date after our meeting today. @rufuspollock yes, I will working to get this done and I will let you know. |
- add select options - change the state of the options - auto infer the type from the table schema - add save schema button
@rufuspollock @anuveyatsu I push some changes for:
Could please confirm if the types should be this below?
Note: The button save only send a console.log with the current state of the table schema. |
@mariorodeghiero type options are listed below from the frictionlessdata spec:
|
@anuveyatsu thanks. I will update the list of types and send a new PR. |
@anuveyatsu @mariorodeghiero is this now complete? |
@rufuspollock All things working only pending tests. |
@mariorodeghiero do we have any tests for this? What would test look like? I thought we had tests for the React component ... |
@rufuspollock We only created a simple test at the beginning of the datapub development. |
FIXED. We can do more tests and that will be a separate issue. |
A Data Dictionary (or Table Schema) provides information about the data in a resource such as the names, types and description of the fields.
https://tech.datopian.com/publish/#adding-a-schema-data-dictionary-for-a-resource
UX
For more, see https://tech.datopian.com/publish/#adding-a-schema-data-dictionary-for-a-resource
Horizontal (spreadsheet like)
Vertical layout
Acceptance
Working table schema editor as react component
UX is along lines of https://tech.datopian.com/publish/#adding-a-schema-data-dictionary-for-a-resource (but feel free to adapt/innovate)
Basic
sample
attribute as array of dictsInfer
Bonus / future
Tasks
Analysis
JSON Schema editors
Research editors for json schema to see if we could reuse for our purposes ...
Design
Here's a rough code sketch of how this component could work:
Schema example for this case:
Inside TableSchema component:
LATER/FUTURE: For inference and having this work with data files ...
Use https://github.com/datopian/data.js for opening files ... (why? gives you all the metadata)
The text was updated successfully, but these errors were encountered: