CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • SQL Import Mapping program
Pages: [1]

Author Topic: SQL Import Mapping program  (Read 904 times)

gharris

  • I post occasionally
  • **
  • Posts: 32
  • Karma: 0
  • CiviCRM version: new
  • CMS version: new
  • MySQL version: new
  • PHP version: new
SQL Import Mapping program
January 23, 2014, 01:49:53 pm
We are trying to move from another MySQL based CRM to CiviCRM.  Looking at the fields, it looks like I will need to use the SQL option for a lot of the mapping between the existing data files and CiviCRM.  Does anyone have a link to field mapping software that will output the resulting map to SQL statements?

Thanks,

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: SQL Import Mapping program
January 23, 2014, 01:59:07 pm
Hi gharris,

You could do what you're describing, but I wouldn't recommend it - by feeding data directly into MySQL you're bypassing a lot of the logic that Civi counts on to keep the data clean.

I recommend using the Civi API - I specialize in migration to Civi, and I use Pentaho Kettle, an ETL tool.  I set up my inputs as the existing MySQL database.  I then map my fields in Kettle - I'll be doing a presentation on this for CiviDay next week if you're in NYC, or I could arrange you join by Google Hangout.

Kettle does more than field mapping - it also transforms your data, so you can get it into the correct format, clean up bad data, etc.

In theory, I could use the "CiviCRM output" step to push directly into CiviCRM, but that's a bit too new/buggy - can't wait for the next version!  Instead, I output to CSV, then use the CSV API command line import tool (https://civicrm.org/blogs/xavier/api_batch_tools) to do the import.

I have steps in Kettle that will SFTP the CSV files to the server, then run the API CSV tool on the remote server - so I can click a single button and do a complete migration.  This is very helpful pre-launch - you can delete the entire contents of the database each night and repopulate it from the legacy database until folks are ready to move over to Civi.

Feel free to ask any follow-up questions!  I haven't built a git repo of all my transforms, but now that I just started a new migration job today, I may well take the opportunity.

Jon
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: SQL Import Mapping program
January 26, 2014, 01:34:53 pm
you could also google for eileen and her work with the drupal Migrate module if you are using that cms
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

gharris

  • I post occasionally
  • **
  • Posts: 32
  • Karma: 0
  • CiviCRM version: new
  • CMS version: new
  • MySQL version: new
  • PHP version: new
Re: SQL Import Mapping program
January 30, 2014, 01:41:37 pm
Wow Jon!  That sounds like a truly nifty setup.  Unfortunately, I apparently missed the subscribe me to this topic button, again, so I wasn't able to take you up on your Google+ offer. (Why isn't that the default for BB's yet?!?)  I'll dig deeper into that setup.

Also, thanks for the heads-up Pete.  I'll look at that option too.  Who knows, might be worthwhile to set up Drupal, then dump and import into WP.

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: SQL Import Mapping program
January 30, 2014, 01:55:31 pm
in theory you can have the same civi wired in to both drupal and wp - so you could then use the drupal for the migration and WP for your front end stuff
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

gharris

  • I post occasionally
  • **
  • Posts: 32
  • Karma: 0
  • CiviCRM version: new
  • CMS version: new
  • MySQL version: new
  • PHP version: new
Re: SQL Import Mapping program
January 30, 2014, 02:00:15 pm
Last year Donald shot that thought down.  Here's the thread:
http://forum.civicrm.org/index.php/topic,28030.msg119741.html#msg119741

That said, maybe something changed?

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: SQL Import Mapping program
January 30, 2014, 02:04:40 pm
maybe just me typing before thinking  :-X - but the uf_match wouldn't be much of an issue IMO as you wouldn't have many users on drupal side of things and would just have to be careful and manage any conflicts for those few directly in the db
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

gharris

  • I post occasionally
  • **
  • Posts: 32
  • Karma: 0
  • CiviCRM version: new
  • CMS version: new
  • MySQL version: new
  • PHP version: new
Re: SQL Import Mapping program
January 31, 2014, 08:39:55 am
Interesting thought.  It would be useful, and "should" be mitigated by not using the same username on both sides and possibly creating a special user id for the Drupal setup.  I think the biggest scare in this would be where the auto-generation of id's occurs.  If CiviCRM is generating, then it should be good.  If the CMS is generating anything, it's going to be an issue.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • SQL Import Mapping program

This forum was archived on 2017-11-26.