Transform data during load in Vertica - use variable with COPY
How can we do an average of the first two column and load it into the third column using a stored value of a Vertica vsql variable.
Extract the number of column in the csv file minus the one column you will store the output and store it in a variable called count.
our data sample is a bellow:
Extract the column count
Run the full script
Done, happy transforming :)