[0A000] ERROR: QUALIFY is not supported.

0

I'm encountering this error, "[0A000] ERROR: QUALIFY is not supported." when running SQL using the QUALIFY clause. SQL that I ran earlier this week ran fine until I re-ran it today.

Is this a known issue or is there a fix I need to make? Below is an example query where I get the same error. I've added both an alias to the table in the FROM clause as well as added a WHERE clause which were suggestions from this post (Possible Bug with Redshift's QUALIFY clause). Thanks!

create table #table (
    id varchar,
    num float
              )
;

insert into #table values
('1',10.0),
('1',20.0),
('2',50.0),
('2',35.5)
;

select
    t.id,
    t.num
from
    #table as t
where
    1=1
qualify
    row_number() over(partition by t.id order by t.num desc) = 1
;
AWS
asked 6 months ago252 views
1 Answer
1

Hi,

QUALIFY is officially supported in SELECTs on Redshift since last July as per https://aws.amazon.com/about-aws/whats-new/2023/07/amazon-redshift-qualify-clause-select-sql-statement/

So, you may want to open a support ticket via the AWS console of your account.

Best,

Didier

profile pictureAWS
EXPERT
answered 6 months ago
  • I'll try following up and see if there were any changes that were made on the cluster.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions