Data Migration Issue

Zipho Mashologu zipho at
Sat Oct 24 17:38:20 EDT 2015

Hi Riak Users

I have a 5 node cluster on my local dev machine, build from source in line
with, and I am using a python
client (script) to migrate my data from PGSQL to riak.

When doing a key insert this is what I get:

Traceback (most recent call last):
  File "./", line 113, in <module>
    store_table_in_riak('trustpay_ops_development', 'bill')
  File "./", line 48, in store_table_in_riak
line 145, in update
line 1001, in update_datatype
line 765, in update_datatype
line 781, in check_http_code
riak.RiakError: 'Expected status [200, 201, 204], received 404'

I don't know what is not found and here is the script:

# Store Postgres table in Riak by row
def store_table_in_riak(database, table):
cursor = psycopg2.connect("dbname={} user=postgres password=postgres
host= port=5598".format(database)).cursor()
bucket = client.bucket(table)
key_set = Set(SETS_BUCKET, table)
cursor.execute("SELECT * FROM {} WHERE created_at <  DATE
rows = cursor.fetchall()
columns_list = list(get_table_columns(cursor, table))
for row in rows:
key = str(row[0])
user_dict = convert_row_to_dict(row, columns_list)
obj = riak.RiakObject(client, bucket, key) = user_dict
obj.content_type = 'application/json'

How can I troubleshoot the above issue as logs are not giving any info?
Your assistance in this will be highly appreciated.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the riak-users mailing list