Skip to main content

Pad Extra Columns in Bulk Insert

  • June 11, 2013
  • 1 reply
  • 9 views

Ravi_Vijay
Forum|alt.badge.img
Hi All, We primarily use COPY FROM LOCAL command for bulk loading data to vertica. The files contains pipe(|) separated columns , one row per line. There are times when we want to add more columns to the existing vertica tables, without disturbing the file generation process (which can later catch up at its own pace). Are there some tweaks to COPY FROM LOCAL itself so that it can self append some empty columns at the end of each line, so that the whole process can continue smoothly ? Thanks in Advance, RAvi.

1 reply

Forum|alt.badge.img+2
  • Participating Frequently
  • June 11, 2013
Hi Ravi, Does the 'TRAILING NULLCOLS' argument to COPY do what you want here?: https://my.vertica.com/docs/6.1.x/HTML/index.htm#1668.htm Otherwise, you can always write a COPY expression that explicitly specifies values for columns that you know will not be present in a given file. Adam