Does regexp_count work in athena?

0

Hi all,

I've googeld the function regexp_count and all I can see that it's supported by presto and by athena. But I'm using it like: , case when wc.da_waarnemingsequence not like '%Q02%' and (regexp_count(wc.da_waarnemingsequence, 'B01') = 1) then 1 else 0 end Aantal_Spookzendingen

I get the error: function regexp_count not registered. Is there an alternative way to use a regexp_count?

질문됨 일 년 전204회 조회
1개 답변
0
수락된 답변

I was able to replicate this issue in Athena V2. regexp_count is one of the functions for which support was added in V3. Please change your Athena version to V3 using these instructions - https://docs.aws.amazon.com/athena/latest/ug/engine-versions-changing.html

When I change it back to V3, I was able to execute the below query.

SELECT regexp_count('1a 2b 14m', '\s*[a-z]+\s*');

Please let me know if you have any questions.

profile pictureAWS
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠