ContinuumIO/blaze — pull request #879 by mrocklin (2014-12-11 17:48:45+00:00)
Title: Support computation on sqlalchemy.MetaData objects

This enables computation on different schemas

```Python
In [1]: from blaze import *

In [2]: engine = resource('sqlite:////home/mrocklin/workspace/db.py/examples/baseball-archive-2012.sqlite')

In [3]: import sqlalchemy

In [4]: metadata = sqlalchemy.MetaData(engine)

In [5]: d = Data(metadata)

In [6]: d
Out[6]:
Data: MetaData(bind=Engine(sqlite:////home/mrocklin/workspace/db.py/examples/baseball-archive-2012.sqlite))
DataShape: {
allstarfull: var * {
playerID: ?string,
yearID: ?int32,
gameNum: ?int32,
gameID: ?string,
teamID: ?string,
...

In [7]: d.salaries
Out[7]:
yearID teamID lgID playerID salary
0 1985 ATL NL barkele01 870000
1 1985 ATL NL bedrost01 550000
2 1985 ATL NL benedbr01 545000
3 1985 ATL NL campri01 633333
4 1985 ATL NL ceronri01 625000
5 1985 ATL NL chambch01 800000
6 1985 ATL NL dedmoje01 150000
7 1985 ATL NL forstte01 483333
8 1985 ATL NL garbege01 772000
9 1985 ATL NL harpete01 250000
...
```

cc @TomAugspurger