Class CopyFileError
COPY INTO <table> reports it in the trailing four
columns of its per-file result — first_error, first_error_line,
first_error_character and first_error_column_name.
"First" is by position in the file, not by error class. Live-verified on a real account
with the discriminating pair: a file whose line 2 holds a column-count error and whose line 3 holds a
numeric-cast error reported the column-count one, and the same two errors with their lines swapped
reported the numeric one — so whichever comes first in the file wins, and neither kind outranks the other.
A file with two bad columns on ONE line reports the leftmost ("H1"["A":1]).
line is 1-based over the PHYSICAL file and counts header lines even when SKIP_HEADER
discards them: a file with three header lines loaded under SKIP_HEADER = 3 reported line 4 for a
bad first data record, while a headerless file reported line 1 for its own first record.
character is the 1-based offset of the offending field's first character within that RAW line —
quote characters included. Live-verified: a bad third field at raw offset 7 reported 7, the same field
pushed to offset 10 by a quoted second field reported 10, and a bad first field reported 1.
columnName is rendered "TABLE"["COLUMN":ordinal] with a 1-based column ordinal — the
BARE table name, never qualified: a COPY INTO db.schema.tbl reported "F1"["AGE":3], not a
database- or schema-qualified name.
character and columnName are null when the format has no line-and-column geometry to
point at: a JSON load reported its record ordinal as the line and left both of those null.
-
Constructor Summary
ConstructorsConstructorDescriptionCopyFileError(String message, int line, Integer character, String columnName) -
Method Summary
Modifier and TypeMethodDescriptionThe 1-based character offset within the raw line, or null for a format without one (JSON, XML, …)."TABLE"["COLUMN":ordinal], or null when the offending column could not be pinned down.intgetLine()
-
Constructor Details
-
CopyFileError
-
-
Method Details
-
getMessage
-
getLine
public int getLine() -
getCharacter
The 1-based character offset within the raw line, or null for a format without one (JSON, XML, …). -
getColumnName
"TABLE"["COLUMN":ordinal], or null when the offending column could not be pinned down.
-