Skip to main content
Question

Reading CSV files with different schemas and writing to SQL server.

  • April 2, 2025
  • 2 replies
  • 67 views

ifawzi
Participant
Forum|alt.badge.img

Hi,

I am new to FME, and I am trying to build an FME workspace that reads multiple .csv files from a folder and write each file to separate table in SQL server. Each CSV file:

  • has different schema
  • should became it is own SQL table

Here is what I tried so far:

  1. I used Directory and File Pathnames reader
  2. I used Feature Reader

The <Generic> port of Feature Reader shows no data, I am assuming because the schema of each is different. the <initiator> port give me the correct file name and path.

2 replies

j.botterill
Influencer
Forum|alt.badge.img+53
  • Influencer
  • April 3, 2025

You will want to connect both the Schema port and the Generic or FeatureType data output ports of a feature reader, going into a FeatureWriter.

Read up about Dynamic Writing

On the FeatureWriter, you need to set it to fme_feature_type and the schema

 


crutledge
Influencer
Forum|alt.badge.img+43
  • Influencer
  • April 3, 2025