locked
Export MySQL and import into CRM RRS feed

  • Question

  • I'm looking to export MySQL (non-MS system) tables and reimport them into CRM.

    The problem is that I'd like to retain the relationships of the the foriegn keys stored in the MySQL tables, in CRM.

    Is there any good way to export the data from MySQL and re-import it to CRM without losing any cross-table dependencies?

    TIA, C

    Wednesday, September 22, 2010 3:14 PM

Answers

  • HI,

     

    Thanks for the suggestions - what I ended up going in the end was to write a set of SQL queries for the tables I wanted to export.

    To export:

    I used a "join" to put into the master table the string representation of data from the output table before saving this out as MS Excel CSV file (removing the NULLs while doing so). So now there is a master table, exported as CSV containing strings rather than foreign key IDs

    I exported any daughter tables, but not their ID only the string representation of the data.

     

    To import to CRM:

    - Setup a set of entities

    - Setup the lrelationships to mirror those where the foriegn key was originally used in MySQL

    - Used DMM(Data Migration Manager) to import the data and map the columns from the CSV to the entites.

    - The DMM can be used to link the relationships to the attributes - which are parsed by their string representation hence creating the realtionship between parent and child tables via. strings instead of foreign keys

     

     

    • Marked as answer by C.Harding Tuesday, October 12, 2010 9:01 AM
    Tuesday, October 12, 2010 9:00 AM

All replies

  • Hi,

    There is no OOB functionality available for the same. But you could tweak with the Exported CSV file from MySQL and import it in MS CRM. You need to specify the Foreign kye [Entity name and GUID] before you import the child records.

    Hope this helps.


    Thanks, Ranjitsingh R | http://mscrm-developer.blogspot.com/ | MS CRM Consultant
    Wednesday, September 22, 2010 4:00 PM
  • You need to perform imort operation two time one for primary table and second for child table. Whle importing child table you need to specify primary key of primary table manually in cvs file.
    Saturday, September 25, 2010 5:53 PM
  • HI,

     

    Thanks for the suggestions - what I ended up going in the end was to write a set of SQL queries for the tables I wanted to export.

    To export:

    I used a "join" to put into the master table the string representation of data from the output table before saving this out as MS Excel CSV file (removing the NULLs while doing so). So now there is a master table, exported as CSV containing strings rather than foreign key IDs

    I exported any daughter tables, but not their ID only the string representation of the data.

     

    To import to CRM:

    - Setup a set of entities

    - Setup the lrelationships to mirror those where the foriegn key was originally used in MySQL

    - Used DMM(Data Migration Manager) to import the data and map the columns from the CSV to the entites.

    - The DMM can be used to link the relationships to the attributes - which are parsed by their string representation hence creating the realtionship between parent and child tables via. strings instead of foreign keys

     

     

    • Marked as answer by C.Harding Tuesday, October 12, 2010 9:01 AM
    Tuesday, October 12, 2010 9:00 AM