[pybsddb] Bulk Data load into a DB

hasanyasin hasanyasin at cubicpen.com
Sat Mar 27 06:57:28 CET 2010


Hi,
I am not sure if that feature is interfaced in pybsddb yet; but before 
that, I will ask you some other things: When you are opening a db, it 
would be better to provide dbtype and flags so we can see what the 
dbtype and flags of it are. Also, if that db did not exist already, it 
won't open without DB_CREATE flag. The name "DB_MULTIPLE" is not 
importad to global scope so you can access it via "db" module name as 
db.DB_MULTIPLE.

In addition to these, saying "this didn't work" does not give any clues 
to us. Please provide the exceptions throwed.

Have a good day,
hasanyasin

On 27.03.2010 00:38, Joepaul Puthenangadi wrote:
> Hi there,
>
> Was reading through the documentation and found something on the 
> oracle website about the possibility of loading bulk key and values 
> into a hash or btree db using the flag = |DB_MULTIPLE. Not trying to 
> be picky or anything just wanted to know whether that is something yet 
> to be implemented to |bsddb3 module.?
>
> Again thanks a lot for the wonderful module.
>
> Thanks again
>
> #Sample code
> |
> |from bsddb3 import db
>
> db1 = db.DB()
> db1.open("Temp.db")
>
> keys = ('key1','key2','key3')
> val = ('10','15','20')
>
> db1.put(keys, val, None, DB_MULTIPLE)
>
> db1.close()
>
> ###
> This did not work. Any thoughts.?
>
> Thanks
>
>
>
> _______________________________________________
> pybsddb mailing list
> pybsddb at jcea.es
> https://mailman.jcea.es:28443/listinfo/pybsddb
> http://www.jcea.es/programacion/pybsddb.htm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.jcea.es/pipermail/pybsddb/attachments/20100327/89734e07/attachment.htm>


More information about the pybsddb mailing list