title: Redshift UNLOAD COPY Failure Data Corruption stl_load_errors MAXFILESIZE
body: <blockquote>
    <h1>select distinct err_reason from stl_load_errors;</h1>
    
    <p>Invalid digit, Value 'e', Pos 0, Type: Integer<br>
    Invalid digit, Value 'e', Pos 1, Type: Double<br>
    Invalid digit, Value 'b', Pos 6, Type: Integer<br>
    Missing data for not-null field<br>
    Invalid digit, Value 'N', Pos 0, Type: Long<br>
    Invalid digit, Value 'd', Pos 2, Type: Double<br>
    String length exceeds DDL length<br>
    Invalid digit, Value '"', Pos 6, Type: Integer<br>
    Invalid digit, Value 'L', Pos 0, Type: Integer<br>
    Delimiter not found<br>
    Invalid data<br>
    Invalid digit, Value 'D', Pos 0, Type: Integer<br>
    Invalid digit, Value 'c', Pos 8, Type: Integer<br>
    Invalid digit, Value 'f', Pos 5, Type: Integer</p>
  </blockquote>
  
  <p>I was having trouble completing a data migration from one Redshift to another using the Unload and Copy functions. After a great deal of inspection it looked like there was data corruption from the UNLOAD statement, but I could not figure out why.</p>