keboola / db-writer-pgsql

Postgre SQL Database Writer
MIT License
0 stars 1 forks source link

Meaningful error message on duplicate source data #22

Closed ujovlado closed 6 years ago

ujovlado commented 6 years ago

If data are not clean - e.g. there is duplicity in some values and PK is set in writer configuration, then writer fails.

But user don't know about it, since error message is really cryptic. Example:

[2018-06-28 10:37:15] wr-db-pgsql.ERROR: PGLOADER: PostgreSQL ["\"public\".\"***_tem ... ***_temp_5b349e34_pkey" [] []
[2018-06-28 10:38:54] wr-db-pgsql.ERROR: Pgloader failed: [] []
ujovlado commented 6 years ago

Fixed by #25

Uz to dava dobre hlasky, napr.:

Application error: [2018-09-21 16:13:04] wr-db-pgsql.ERROR: SQLSTATE[23505]: Unique violation: 7 ERROR: duplicate key value violates unique constraint "numbers_temp_5ba4fc6a60ac4_pkey" DETAIL: Key ("1")=(1) already exists. [] []