1

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 ?

vineeth
  • 641
  • 4
  • 11
  • 25

1 Answers1

2

You could use a named pipe with INGEST.

Something like this:

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

Then read from mypipe.

data_henrik
  • 16,724
  • 2
  • 28
  • 49
  • Thanks @data_henrik it was really useful and When i run the ingest with the delete statement it gives the number of rows inserted as 0 and doesn't show the number of rows deleted. Is there any option to show the number of rows deleted ? – vineeth Aug 12 '21 at 06:29
  • Open a new question, I don't know. Thanks for the feedback – data_henrik Aug 12 '21 at 07:44