Hi Mark.
Thanks for passing this along the example. This solution deals with tables that already have an id set on the records in them. In my case I don't have them yet or at least I need to modify them to include many more from multiple sources. I'm merging similar data from different divisional databases into a singular series of tables. I need to generate an id for each record and then place it in the database and make it available for the child records to be created. I think I have made some progress here though. I'm using a counter to develop the id an then ouput to both the parent and intermediate tables. Now I keep running into foreign key constraints on the mysql tables. I have turned off the foreign_key_checks global variable within MySQL prior to running my workbench file (which I sent along to you) but it seems to keep checking anyway, or at least FME seems to. Is there any way to tell FME not to check the constraints? I'm still trying to figure out how to get my contactids and companyids generated and made available to build the correct usicompcontacts intermediate table? Again I have to regen new ids for both before building the intermediate table. Thanks --- In [email protected], "mark2atsafe" <[EMAIL PROTECTED]> wrote: > > Hi > I took a look at this task, and the first seemed so simple I'm > thinking I must've done something wrong. I tried to make up some data > and then processed it in a workspace. It turned 2 source tables with a > common ID into 3 tables, the third being a many-to-many lookup. Have a > look at the files and tell me what you think. Let me know if it > doesn't match your setup (I used CSV instead of a database, but the > techniques would be the same). > > The zip file is in the 'Files' section of the group - and I will email > it to you directly. > > As for the second problem, I think you are right that it is pretty > much the same issue. > > From what I've tried here I wouldn't use the SQLExecutor transformer > to do this job - unless there are some subtle points I'm missing. > > Hope this helps, > > Mark > > Mark Ireland > Product Specialist, Safe Software > > > --- In [email protected], "wallace_tobin" <wtobin@> wrote: > > > > I am in the process of moving a number of tables of data from a > > access databases into a single backend mysql database. In doing so > > some of the tables and relationships have been reconfigured in the > > mysql db. > > > > In one particular case the companyid of a contact that once was > > maintained directly on a contact table record would now be maintained > > in a many-to-many intermediate table of company_contacts. As I > > perfrom the import of the company and contact records into mysql is > > there a way to build the intermediate table of company_contacts as > > the companys and contacts table are being converted or must this be > > done after both tables have been rebuilt? > > > > I'm having the same issue with maintaining contact email addresses in > > a separate table. I would like to be able to build a temporary > > lookup list of all emails, providing it with an id, currently in the > > contacts table and then assign the proper id for the given email in > > the newly built mysql table. I guess I would have to build the temp > > list first in the workbench which would mean looking through the > > entire source table first before processing each record in the table > > afterward for the remaining conversion tasks. I'm not sure how you do > > that? > > > > Maybe someone could give me a hint or two on how you might be able to > > achieve this sort of task? I've tried doing some searches for this > > but haven't gotten anywhere. I'm trying to use the SQL Executor but > > am having trouble looking up the email and creating a corresponding > > id to set on my contact record. > > > Join us at the FME Worldwide User Conference Sept. 21-22, 2006 Vancouver BC Canada. For more information, visit www.safe.com/2006uc. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/fme/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
