I am trying to copy data into redshift from s3. While running the following:
1.9.2p320 :017 > res = psql_conn.exec("copy table_name from 's3_path' CREDENTIALS 'aws_access_key_id=xxxx;aws_secret_access_key=xxxx' delimiter '|' timeformat 'YYYY-MM-DD HH:MI:SS' REMOVEQUOTES NULL AS 'NULLL' MAXERROR AS 500 ACCEPTANYDATE TRUNCATECOLUMNS COMPUPDATE OFF;")
INFO: Load into table 'table_name' completed, 1 record(s) loaded successfully.
INFO: Load into table 'table_name' completed, 2 record(s) could not be loaded. Check 'stl_load_errors' system table for details.
=> #<PG::Result:0x007ff90b9c6240>
My question is how do I capture the INFO: rows into a variable or know if some stl_load_error occured?