Dynamic data import / export


simply more productive
Up to 100,000 records can be processed with the freeware version!
Welcome, Guest
Username: Password: Remember me
Welcome to the FlowHeater support forum.

Questions about using FlowHeater are answered here.
  • Page:
  • 1

TOPIC: import if csv to sql

import if csv to sql 5 years 11 months ago #2108

  • john guillot
  • john guillot's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 1
I have a batch of text files that need to be regularly importe into an sql database
the only strange thing is that there is a header which looks like :
10|2|6/1/2010 12:00:06 PM|PreExistingCond|PreExisting Condition Letter|||D


10|4|8/23/2010 1:28:02 PM|DETO|Dependent Over Age Limit|DETO|DETO|D

after that, it is a | deliminated file.
I need to do an import that will look for the field containing PreExisting Condition Letter or Dependent Over Age Limit and then use that to fill a field for every line imported from that text file.

Each text file has a header like that followed by rows of | deliminated address informatoin. That area determines the type of letter to be sent, so that needs to be repliccated to the last column called lettertype before the import. There is no column header information in the file, so columns are determined by their position.
Any help would be appreciated.

Please Log in or Create an account to join the conversation.

Re:import if csv to sql 5 years 10 months ago #2109

  • FlowHeater-Team
  • FlowHeater-Team's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 254
It's possible but a bit tricky :)

I've made a little example; please have a look to the attachment import_header.zip.

The following steps are necessary
  1. Create a new Definition and configure the READ TextFile Adapter without the option "The first row containing column headings"
  2. Then we need two .NET Script Heater and one Filter Heater to Filter the first line = the header line.
  3. The script in the first .NET Script Heater stores the certain header information for each other lines.
  4. The second script just handles to filter the first header row.
  5. The Filter Heater filters the header line.

Attachment import_header.zip not found


Please Log in or Create an account to join the conversation.

Best wishes
Robert Stark

Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.
  • Page:
  • 1
Moderators: FlowHeater-Team
Time to create page: 0.081 seconds