Created
December 23, 2012 12:56
-
-
Save avelino/4363258 to your computer and use it in GitHub Desktop.
Inset 1000000 records in Riak via Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import riak | |
client = riak.RiakClient() | |
bucket = client.bucket('test') | |
for i in range(0, 1000000): | |
person = bucket.new('riak_developer_%d' % i, data={'name': 'Thiago Avelino %d' % i, | |
'age': 18+i, | |
'language': ['python'],}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment