Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7738145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:11:21+00:00 2026-06-01T08:11:21+00:00

I want to transfer data(21M rows) from mysql database to DynamoDB. I am using

  • 0

I want to transfer data(21M rows) from mysql database to DynamoDB. I am using boto Python API and django 1.3.1 to export data from mysql and transfer it to DynamoDB. Below is the code:

      conn = boto.connect_dynamodb()
      start_date = datetime.date(2012, 3, 1)
      end_date = datetime.date(2012, 3, 31)
      episode_report = TableName.objects.filter(viewdt__range=(start_date, end_date))
      #Paginate 21 million rows in chunks of 1000 each
      p = Paginator(episode_report, 1000)
      table = conn.get_table('ep_march')
      for page in range(1, p.num_pages + 1): 
          for items in p.page(page).object_list:
              item_data = {
                        'id': int(items.id),
                        'user_id': format_user(items.user),     #Foreign Key to User table
                        'episode_id': int(items.episode.id),          #Foreign Key to Episode table
                        'series_id': int(items.series.id),      #Foreign Key to Series Table
                        'viewdt': str(items.viewdt),                   
                     }
              item = table.new_item(
                                    # Our hash key is 'id'
                                    hash_key= int(items.id),
                                    # Our range key is 'viewdt'
                                    range_key= str(items.viewdt),
                                    # This has the
                                    attrs=item_data
                                )
              item.put() 

The issue is that the process has been running for more than 12 hours and has still transferred 3M rows. Any ideas to speed up the process?

I would create more threads and parellize the transfer and see if that helps.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T08:11:22+00:00Added an answer on June 1, 2026 at 8:11 am

    First, what is the provisioned throughput of your DynamoDB table? That will ultimately control how many writes/second you can make. Adjust accordingly.

    Second, get some sort of concurrency going. You could use threads (make sure each thread has it’s own connection object because httplib.py is not threadsafe) or you could use gevent or multiprocess or whatever mechanism you like but concurrency is key.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want transfer data from MongoDB to SQL Sever using the C# driver. The
I want some help on a way to transfer data from a python web
I want to use Custom URL Scheme to transfer data from application to other
I am new to wordpress and i want to transfer data from one page
I want to transfer a large amount of data from F# to an SQL
I want transfer some data between 2 tables from difference DBs But the source
I am doing webparts in sharepoint and I want to transfer the data from
I use SQL Server Import and Export Wizard to transfer data from a remote
I want to transfer data from a vertical db layout like this: --------------------- |
I want to transfer data from my desktop pc/mac to my iphone app. To

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.