Skip to main content
I was wondering the steps to populate an existing SQL table from MSAccess DB's. The issue is that the field names from the 40 different access db's are not the same as those in the SQL table for example, in the SQL table I have a field called "Material" but the data I want to populate it with is in an access table in a field called "mat_type". I assume I will have to have a different workbench for each access db as the fields are diffrent in each. I would like to keep adding to the SQL table with all of the data in the seperate 40 Access DB's, how exactly do I keep appending to the SQL table?

 

Finally, I would like to add an identifier field to the SQL tables that is not located in the Acess DB's, how is this achieved?

 

 

Thanks,
Hi,

 

 

your question is a bit light on the technical details, but here is how it might be done:

 

  • Create a writer for the SQL database connection (but do not create a feature type when FME asks you)
  • Import the existing table definition using the menu Writer / Import feature type. This ensures that you get a perfect match between FME and your SQL database, which is important.
  • Create a Reader for your Access databases. If they all have the same schema, you can add them all at once to the same workbench using a dynamic schema reader. If not, you will have to add them all individually.
  • Insert an AttributeRenamer so that you can rename "mat_type" to "Material", etc.
  • Insert a Counter and name the resulting attribute according to your SQL database primary key (identifier)
That should (more or less) be it. If you have further questions, please be as specific as possible. Screenshots are really helpful.

 

 

David
Hi,

 

 

A posibble addition is to make use of the schema mapper, this especially useful when you have lots of attributes to rename and keep the attribute mapping flexible.

 

 

Itay

 

 

p.s. you can extract the input and output schema (schema reader 2 csv) to help you create the mapp

Reply