blaze / datashape

Language defining a data description protocol
BSD 2-Clause "Simplified" License
183 stars 65 forks source link

Allow for handling Map types in conversion to numpy dtypes #224

Closed dhirschfeld closed 7 years ago

dhirschfeld commented 7 years ago

This PR simply keeps the key, ignoring the mapped (foreign-key) table. The idea being that a lossy conversion is better than throwing an exception and the user can always incorporate the foreign-key table if that's what they want by doing an explicit join beforehand.

Attn: @llllllllll (blaze/odo#534)

dhirschfeld commented 7 years ago

I need datashape to be able to handle foreign-key columns/tables which are very common in the databases I'm using. This is a very simple change which allows for that. AFAICS, without this change there is no way to use blaze/odo/datashape with any table which includes a foreign-key column?

In case it's useful for others I've published this branch on my anaconda.org repo:

conda install -c dhirschfeld datashape=0.5.4.post005+dhirschfeld.ga867aae
mharradon commented 7 years ago

Any chance we could get an update on this? @llllllllll

My current (end-user) experience is:

  1. Try to copy table from database to pandas dataframe using odo.
  2. Get error in dependent library.
  3. Determine that error is due to property of table I don't know or care about.
  4. Use dhirschfeld's branch and include pulling from DHirschfeld's branch as part of deployment process.

So for me and anyone else using foreign keys in their databases the primary distribution channel for datashape is currently a branch in dhirschfeld's fork of the github repository.

llllllllll commented 7 years ago

Thanks for the ping, this change looks good.