Athena Parameterized Query does not ask for parameter values

0

I've created a parameterized query in Athena. When I run it in the console, according to the documentation, "you will see a user interface that allows you to enter the parameter values directly" but that is not happening. Instead, I get an error that says, "SYNTAX_ERROR: line 4:1: Incorrect number of parameters: expected 1 but found 0". Any thoughts on what I'm doing wrong here? I tried saving it and opening the saved query instead, but still get the same result.

hemp
asked 2 years ago795 views
1 Answer
1

Hi, @hemp.

If you do the following as per the docs does it still fail?

SELECT * FROM "my_database"."my_table"
WHERE year = ? and month= ? and day= ?

Parameterized queries are supported only in Athena engine version 2.
Are you running the latest engine version in the specified workspace?

https://docs.aws.amazon.com/athena/latest/ug/querying-with-prepared-statements.html

profile picture
EXPERT
iwasa
answered 2 years ago
AWS
EXPERT
reviewed 2 years ago

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