The gpload reports bad rows:
INFO|gpload session started <certain_timestamp> INFO|started gpfdist -p <certain_port> -f "<certain_file>" -t 30 WARN|5 bad rows
However, the error log does not save the output:
<certain_dbname>=# SELECT gp_read_error_log('<certain_external_table>'); gp_read_error_log ------------------- (0 rows)
ALL Greenplum database versions.
All Gpload versions.
1.] The cause of the issue could possibly be that the REUSE_TABLES:TRUE not specified in the gpload yaml configuration, like:
PRELOAD: - REUSE_TABLES: true
As document mentioned, When LOG_ERRORS is set TRUE, REUSE_TABLES must also be set TRUE if we want to retain the records in the error logs. Otherwise, the error log records will be deleted after gpload operation completes as the temporary external table is deleted:
If LOG_ERRORS: true is specified, REUSE_TABLES: true must be specified to retain the formatting errors in Greenplum Database error logs. If REUSE_TABLES: true is not specified, formatting error information is deleted after the gpload operation.
2.] Even if still its not visible make sure to use the '-v' option to see the gpload error tables which holds the expected info.
For example -
[gpadmin@xxxxxxx00001 sample_gpload]$ gpload -f test.yaml -l test.log -v
2024-12-10 16:34:27|INFO|gpload session started 2024-12-10 16:34:27
2024-12-10 16:34:27|INFO|no host supplied, defaulting to localhost
2024-12-10 16:34:27|LOG|trying to run gpfdist -p 8000 -P 9000 -f "test.csv" -t 30 -v
2024-12-10 16:34:27|LOG|gpfdist says: 2024-12-10 16:34:27 698686 INFO Before opening listening sockets - following listening sockets are available:
2024-12-10 16:34:27|LOG|gpfdist says: 2024-12-10 16:34:27 698686 INFO IPV6 socket: [::]:8000
2024-12-10 16:34:27|LOG|gpfdist says: 2024-12-10 16:34:27 698686 INFO IPV4 socket: 0.0.0.0:8000
2024-12-10 16:34:27|LOG|gpfdist says: 2024-12-10 16:34:27 698686 INFO Trying to open listening socket:
2024-12-10 16:34:27|LOG|gpfdist says: 2024-12-10 16:34:27 698686 INFO IPV6 socket: [::]:8000
2024-12-10 16:34:27|LOG|gpfdist says: 2024-12-10 16:34:27 698686 INFO Opening listening socket succeeded
2024-12-10 16:34:27|LOG|gpfdist says: 2024-12-10 16:34:27 698686 INFO Trying to open listening socket:
2024-12-10 16:34:27|LOG|gpfdist says: 2024-12-10 16:34:27 698686 INFO IPV4 socket: 0.0.0.0:8000
2024-12-10 16:34:27|LOG|gpfdist says: 2024-12-10 16:34:27 698686 INFO Opening listening socket succeeded
2024-12-10 16:34:27|LOG|gpfdist says: Serving HTTP on port 8000, directory /data/user/project/sample_gpload
2024-12-10 16:34:27|INFO|started gpfdist -p 8000 -P 9000 -f "test.csv" -t 30 -v
2024-12-10 16:34:27|LOG|gpfdist is running on port 8000
2024-12-10 16:34:34|INFO|reusing external table ext_gpload_reusable_1c9cb8a6_b74e_11ef_85a8_e4434bbf06f0
2024-12-10 16:34:34|LOG|INSERT INTO <removed the list of columns names> FROM ext_gpload_reusable_1c9cb8a6_b74e_11ef_85a8_e4434bbf06f0
2024-12-10 16:34:34|WARN|8 bad rows
2024-12-10 16:34:34|WARN|Please use following query to access the detailed error
2024-12-10 16:34:34|WARN|select * from gp_read_error_log('ext_gpload_reusable_1c9cb8a6_b74e_11ef_85a8_e4434bbf06f0') where cmdtime > to_timestamp('1733873667.05')
2024-12-10 16:34:34|INFO|running time: 7.78 seconds
2024-12-10 16:34:34|LOG|killing gpfdist
2024-12-10 16:34:34|LOG|terminating all threads
2024-12-10 16:34:34|LOG|all threads are terminated
2024-12-10 16:34:34|INFO|rows Inserted = 92
2024-12-10 16:34:34|INFO|rows Updated = 0
2024-12-10 16:34:34|INFO|data formatting errors = 8
2024-12-10 16:34:34|INFO|gpload succeeded with warnings
[gpadmin@xxxxxxx00001 sample_gpload]$ psql
psql (9.4.26)
Type "help" for help.
test3=# select * from gp_read_error_log('ext_gpload_reusable_1c9cb8a6_b74e_11ef_85a8_e4434bbf06f0') ;
cmdtime | relname |
filename | linenum | bytenum | errmsg |