frictionlessdata / tableschema-js

A JavaScript library for working with Table Schema.
http://frictionlessdata.io/
MIT License
82 stars 27 forks source link

Use for generation? #150

Closed pmackay closed 5 years ago

pmackay commented 6 years ago

I am exploring the idea of programmatically generating a datapackage.json. Can this be used to generate JSON that represents a table schema that would be added to a datapackage definition?

roll commented 6 years ago

@pmackay Hi, do you mean inferring some data files?

pmackay commented 6 years ago

I mean calling API methods to build up a logical schema model and then outputting a JSON representation of that model that matches the datapackage.json format.

roll commented 6 years ago

@pmackay Yes, sure https://github.com/frictionlessdata/tableschema-js#schema

Other question that for outside of basic cases it will require a descriptor editing anyway

schema.descriptor[...] = ...
schema.commit()