Skip Header row when loading data from csv using Ingest Utility in db2

274 Views Asked by At

I am trying to load data into a db2 target table from a csv file using the ingest utility. I see the header row getting rejected with an error message. Is there any option (similar to skipcount in import utility) to skip the header row so to avoid getting the rejected message ?

1

There are 1 best solutions below

2
data_henrik On BEST ANSWER

You could use a named pipe with INGEST.

Something like this:

mkfifo mypipe
tail -n +2 data.csv > mypipe

Then read from mypipe.