By gttygrl on
I'm following the tutoral on lullabot for migrating data using Migrate and Table Wizard. (http://www.lullabot.com/articles/drupal-data-imports-migrate-and-table-w...)
I imported my delimited file with TW, clicked 'analyze' (all fields are there), then 'Export views definitions for selected files', got code I don't know what to do with. Went to Migrate, where my imported table is not appearing under 'Source view from which to import content'.
There haven't been any error messages, so I have to assume I'm missing a step? Also, the tutorial mentions that you can click on the table name to view the contents, but my table isn't clickable in TW.
What am I doing wrong?
Comments
Hey gttygrl, I had the same
Hey gttygrl,
I had the same issue today, but came to a solution 5 minutes ago.
Here is how it worked out for me:
Remove all tables from TW
Add them again...
Run 'Export views definitions for selected files' twice, then head over to 'Migrate'. Your tables should be there.
Sounds crazy, but that's the way it work on my machine...
Oo, I'll try that, thanks!
Oo, I'll try that, thanks!
Nothing. Even worse, now when
Nothing. Even worse, now when I import with TW, it's not pulling the data, just the field titles. This is ridiculously frustrating.
I don't know if I'm just
I don't know if I'm just hacking the Tables Wizard module or if there is a better way to do this.
The TW requires a primary key. A primary key column in the database requires no duplicate and that it is a serial number (1,2,3,4,5.....). I open the table after I import it with the TW in phpMyAdmin. I click on the table I just imported and then the 'structure' menu tab at the top. I go to the field that I want to make the primary key and click the little pencil. I convert the type from VARCHAR to INT. Then I finally click the primary key button for that field which is next to the pencil.
This then requires going to the table in the TW and 'reanalyze' and it should. Since I have it checked by default that it automatically creates views, I'm good to go to the Migrate module.
NOTE: This is sort of fun. I had two tables one with lat and log of cities and another with facts about the cities. I made the city name in both tables a key when I checked next to them in the TW. I then went to the Relationships section of TW and chose the facts table about the city field with the city's name, then I chose the location table with the city field.
When I opened up the view in the Views section of the facts table, I clicked relationships and then OK. After this I found the table would allow me to add all the fields from the location table to the facts table.
After in the Migrate module admin section, I could use all those fields to populate a new table in the database. For example, my new table had the fields, city name, population, country, lat and log.
With the OpenLayers mapping module, it's real easy to import and use this information which will open up a lot of opportunity to do really, really cool and awesome stuff with Drupal.