Permission denied for relation stl_load_errors on Redshift Serverless

5.5k Views Asked by At

I use Amazon Redshift Serverless and Query editor(v2) and I'm having trouble with user permissions. The following error occurred when importing data(.csv) in S3.

ERROR: Load into table 'x' failed. Check 'sys_load_error_detail' system table for details.

Therefore, I executed the command Select * From stl_load_errors to check the error, but it did not work well.

ERROR: permission denied for relation stl_load_errors

I checked my user permissions using select * from pg_user;and they are presented as follows. However, I don't see any problem, what is the problem? (I use hoge.)

usename usesysid usecreatedb usesuper usecatupd passwd valuntil useconfig
rdsdb 1 true true true ******** infinity NULL
hoge 101 true true false ******** NULL NULL

I have tried to look at the query in the Amazon Redshift Serverless (Preview) dashboard under "Query and Database Monitoring", but could not find any details about the error.

What should I do?

2

There are 2 best solutions below

0
On BEST ANSWER

try

select * from sys_load_error_detail
0
On

AWS Redshift serverless is not exposing the stl_load_errors table

Perhaps you should try SYS_LOAD_HISTORY and SYS_LOAD_ERROR_DETAIL.

https://docs.aws.amazon.com/redshift/latest/mgmt/serverless-monitoring.html You can't query STL, STV, SVCS, SVL, and some SVV system tables and views with Amazon Redshift Serverless, except the following: ...see link above....