'Amazon Athena external lambda function (udf) - create view
I am trying to create an external function in Athena using AWS Lambda function. I am able to do so and query successfully using Athena query editor. Code is below.
using external function s3signedurl(col1 VARCHAR) returns varchar lambda 'customudf'
select incident, pdfloc, s3signedurl(pdfloc) as s3_signed_url
from "lambdapoc"."lambdametadata"
However I want to create a View on top of this so I can query it easily like a table/view (Select * from MYVIEW) from a Reporting Tool like Tableau OR any other tool which connects to Athena. I don't seem to find the documentation for it or any examples on the Internet.
Please note: Column 's3_signed_url' data is dynamically generated from Lambda function and it will change everytime the query is executed.
Can anyone help?
Solution 1:[1]
I just got to know that "Using connectors or UDFs in Views are not supported". It is mentioned in their GitHub Repo. Closing this question
Solution 2:[2]
Might be worth exploring if a Create Table As Select (CTAS) table would meet your needs. I believe it is compatible with UDFs
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | akshay lad |
Solution 2 | Alec |