Skip to content

Redshift COPY時のエラーを確認する

Posted on:2019年3月1日 at 00:00

COPY 時のエラーの確認方法

失敗した場合 Datapipeline Stderr

could not be loaded. Check 'stl_load_errors'

と表示される。

MAXERROR オプションを有効にしておく

COPY のオプションに MAXERROR 100000 を指定しておく MAXERROR のデフォルト値は 0、そしてその限度は 100000

確認 SQL

select query,
filename as filename,
line_number as line,
colname as column,
type as type,
position as pos,
raw_line as line_text,
raw_field_value as field_text,
err_reason as reason
from stl_load_errors
order by query desc
limit 100;

参考

データのロード操作 - Amazon Redshift