Dynamic data import / export

datenbank

simply more productive
Up to 10,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.

TOPIC: Column mismatch

Column mismatch 6 years 4 months ago #2009

  • FlowHeater-Team
  • FlowHeater-Team's Avatar
  • Offline
  • Administrator
  • Posts: 240
Translated submission in the German forum. You can read the original entry here.

Sometimes CSV or TXT files lack a few column separators (the table contents are thereby shifted one column to the left). Is there an option of some sort where you can define the column count and whenever it is less, skip the whole row?

ali
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.
Last Edit: 6 years 4 months ago by FlowHeater-Team.
The administrator has disabled public write access.

Re:Column mismatch 6 years 4 months ago #2010

  • FlowHeater-Team
  • FlowHeater-Team's Avatar
  • Offline
  • Administrator
  • Posts: 240
Hi Ali,

You can achieve this using the If-Then-Else Heater together with the Filter Heater.

1. Drag both heaters onto the Designer window
2. Connect the last CSV text file field as input to the If-Then-Else Heater
3. Connect the output of the If-Then-Else Heater to the Filter Heater
4. Double click on the If-Then-Else Heater
5. Set the condition to "= NULL"

This procedure will filter out any row where there is an insufficient number of separators.

How does that work? When the TextFile Adapter reads a CSV file in, fields are undefined if they are unavailable. This unavailability is detected by the conditional test described above. If one or more field separators are missing in the row, the last field is always set to NULL.
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.
The administrator has disabled public write access.
Moderators: FlowHeater-Team
Time to create page: 0.069 seconds