Skip to content
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

Support dict-like database migration #22

Open
mrocklin opened this issue Jan 14, 2015 · 2 comments
Open

Support dict-like database migration #22

mrocklin opened this issue Jan 14, 2015 · 2 comments
Milestone

Comments

@mrocklin
Copy link
Member

Objects like HDF5 files, SQL databases, Mongo Databases, and dicts of chunks of things might all be convertible. One could also imagine adding a very thin Directory type that expressed a filesystem hierarchy as a nested record type.

A natural common interchange format here might include dicts of either chunks(DataFrame) or chunks(ndarray) depending on the underlying dshape. This would also be a good place for chunks(dynd.nd.array).

@cpcloud
Copy link
Member

cpcloud commented Jan 17, 2015

what exactly do you mean here by dict-like database?

do you mean this?

d = {'db1': MongoDB, 'db2': HDF5File}

@mrocklin
Copy link
Member Author

We represent database-like things with Record dshapes. e.g.

>>>  discover('sqlite:///mydb')
{
 table1: var * {... },
 table2: var * {... },
}

>>> discover('myfile.hdf5')
{
 data: {x: 10 * 10 * int, y: 10 * 10 * int},
 date: datetime
}

Perhaps when I said dict-like I meant Record dshape.

I can imagine doing something like the following:

>>> into('myfile.hdf5', 'sqlite://my.db')

Probably there are no nice and clean direct mechanisms for this, but probably something like Dict(Chunks(pd.DataFrame)) would be a sufficient intermediary. This is all low-priority though. We don't have an immediate use for this.

@cpcloud cpcloud modified the milestones: 0.3.1, 0.3.2 Mar 6, 2015
@cpcloud cpcloud modified the milestones: 0.3.2, 0.3.3 Apr 17, 2015
@cpcloud cpcloud modified the milestones: 0.3.3, Someday Jul 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants