Skip to main content
simply more productive

The Data Specialist

Thanks to our intuitive transformation designer, you can convert data effortlessly to a variety of formats without knowing how to program. It’s not only efficient, it’s also easy to use.
Flowheater Download

import if csv to sql

  • john guillot
  • Topic Author
  • Offline
  • User
  • User
More
12 years 11 months ago #2108 by john guillot
import if csv to sql was created by john guillot
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

or

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 to join the conversation.

More
12 years 11 months ago #2109 by FlowHeater-Team
Replied by FlowHeater-Team on topic Re:import if csv to sql
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


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.
Attachments:

Please Log in to join the conversation.

Time to create page: 0.282 seconds

FlowHeater - The Data Specialist

Efficient data integration and transformation with FlowHeater – the perfect solution for a seamless transfer of your data.

Rechtliches

Support & Contact

Kontaktinformation

Telefon:0951 / 99339792 E-Mail:This email address is being protected from spambots. You need JavaScript enabled to view it.

Copyright © 2009-2024 by FlowHeater GmbH. All rights reserved.