Hi,
 
I ran into the FK problem myself.  The trick is that MySQL writes to its output 
data sources in order, so you just have to create multiple MySQL data sources, 
all pointing to the same database.  Then ensure that your lookup tables are 
written to an output data source that is higher up than one that holds the 
tables that reference them.  Self-referential relationships (manager_id is fk 
to employee_id in same table) would still be a problem though.
 
To build the new intermediate table:
 
- Generate the new IDs on both tables using counters (make sure to use 
different counter names)
- Take a copy of the Contacts table and join it to Companies table with a 
FeatureMerger using the old company_id
- This will give you a big table with both the old and new company and contact 
IDs
- Run this through an AttributeAccumulator, grouping by newCompanyID, 
newContactID
 
Jason
 
________________________________

From: [email protected] on behalf of wallace_tobin
Sent: Fri 2006-06-02 12:26 PM
To: [email protected]
Subject: [fme] Re: Builiding intermediate tables while converting parent tables 
in many-to-many

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.



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/
 

<<winmail.dat>>

Reply via email to