Closed maxreis86 closed 2 years ago
Hi @maxreis86 - Thanks for opening a new issue!
I assume when the above SQL tries to run, Athena returns an error. Is that correct?
The Presto driver has mappings for both median
and percentile
that I probably need to incorporate.
Hi @dacort,
Yes. Exactly. Athena returns the error:
[Simba][AthenaJDBC](100071) An error has been thrown from the AWS Athena client. line 2:43: mismatched input '('. Expecting: 'BY' [Execution ID not available]
Thank you for your help!
Hi dear all,
When I try to use the Percentile function in metabase, the metabase-athena-driver create a wrong SQL script.
I tried the function
Percentile([Max
Salary Expected], 0.25)` and the driver send to Athena the follow SQL:select PERCENTILE_CONT(0.25) within group (order by a.max_salary_expected) FROM "prod-lakehouse-mirror"."applications" as a
However the right code should be:
select approx_percentile(a.max_salary_expected, 0.25) FROM "prod-lakehouse-mirror"."applications" as a
Thank you in advance.