import metakit
db=metakit.storage("db/linelists"+"09_11_2003"+".mk",1)#OK
vw=db.view("linelists")#OK
m=db.getas("09_11_2003"+'_map[_H:I,_R:I]')#OK
vw=vw.hash(m,1)#OK
for r in vw:#OK
print r.mid,r.syndrome,r.date_visit,r.age_group,r.gender,r.zip,r.event,r.disposition,r.temperature,r.dob,r.provider_id,r.mem_rec,r.event_id,r.icd9,r.tests,r.payer#This dies?
Why would that be? I was assuming the error was in the hash business....... When just print r I get that there are actually things there i.e.<PyRowRef object at 29c6d08>
Now I am really confused. :(
Brian Kelley wrote:
Adam Russell wrote:
Maybe I am creating my hash all wrong.
view looks like
db=metakit.storage("foo.mk",1)
vw=db.getas("linelists[mid:S,field1:S,field2:S,field3:S,field4:S,field5:S,field6:S,field7:S]")
Whenever you call getas the table is restructured. If in one script you call
vw=db.getas("linelists[mid:S,field1:S,field2:S,field3:S,field4:S,field5:S,field6:S,field7:S]")
unless you want the database to change, you should either call the same getas statement in another script or use
vw = db.view("linelists")
Your hash calls are correct.
run the following script and send back the results (I'm just opening your db here):
import metakit db=metakit.storage("db/linelists"+"09_11_2003"+".mk",1) print db.description()
_____________________________________________ Metakit mailing list - [EMAIL PROTECTED] http://www.equi4.com/mailman/listinfo/metakit
