Athena Prepared Statement throws Exception for Lambda Expressions, Incorrect number of parameters: expected 0 but found 2
0
I have the following query in Athena, I am using S3 as data store. I have 2 query parameters in the lambda expression.
PREPARE my_select1 FROM
SELECT address.phonenumbers FROM \"nested-query-db\".\"data_with_json1\" where
cardinality(filter(address.phonenumbers,js->js.type = ? and js.number = ?)) >0 and
cardinality(filter(address.phonenumbers,js->js.type = 'city'and js.number = '4')) > 0 and
firstname ='Emily';
When I execute it using
EXECUTE my_select1 USING 'Home', '1';
It throws the following error.
java.lang.RuntimeException: Query Failed to run with Error Message: SYNTAX_ERROR: line 1:1:
Incorrect number of parameters: expected 0 but found 2