By using AWS re:Post, you agree to the Terms of Use

Athena Parameterized Query does not ask for parameter values


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.

asked 16 days ago15 views
1 Answer

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?

profile picture
answered 16 days ago
reviewed 14 days 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