DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: from sas/sas7bdat to mysql

  1. #1
    Join Date
    Nov 2014
    Posts
    1

    from sas/sas7bdat to mysql

    Hey,

    I am fairly new to mySQL and I am looking for some help in how to best turn fairly large SAS datasets into SQL databases. Ideally, reading directly the sas7bdat file would be great, but if that's not possible somehow writing the SAS database into a format that can easily be processed by mySQL would be ok as well–just would like to avoid having SAS directly involved as mySQL database is going to be on MAC. The datasets are rather large, talking of about 20 sas7bdat files in compressed format of each of each 7.5GB, i.e. writting those out as a csv is possible but together will take up to around 1TB. Unfortunately, I have not found any help for this on the web, which is why I am turning to this forum. If anyone has experience with this or could point me into the right direction/helpful sites, would be great.


    Thanks!

  2. #2
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    If you can connect to the current data store with ODBC, you might be able to use Perl to read all of the data from the current tables and insert it into new tables in the mySQL database. You need to know what tables you are moving and create them first in mySQL, probably without the constraints or foreign keys. You can create the constraints or foreign keys after you move the data. You are better off using something like Perl, since some of the data might be something other than text data, and you don't want the data to change during the migration.

    Plan on doing a lot of iterations of the migration and a lot of testing. Also you should write a generic Perl script that will move any table, and run it in parallel as much as possible.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width