datahuborg / datahub

An experimental hosted platform (GitHub-like) for organizing, managing, sharing, collaborating, and making sense of data.
https://datahub.csail.mit.edu
MIT License
210 stars 60 forks source link

Added file import api to Table class #206

Closed sunb123 closed 7 years ago

sunb123 commented 7 years ago

API payload data specifies "file_name." Is this ok?

RogerTangos commented 7 years ago

Hey @sunb123. I'm not sure if @justinanderson is already corresponding with you on this. Calls to the DataHubManger should be placed through serializer.py. In this case, importing a file might require two REST commands. One to upload the file, and the other to import it.

In this case, you might want to make to make an file_to_table method similar to serializer.FileSearializer.upload_file in TableSerializer' or FileSerializer.

justinanderson commented 7 years ago

I've pushed #207 which should work. My original suggest to put this as an endpoint on the Table class was incorrect. I should've said Tables, as that's where POSTs create new tables.