presto icon indicating copy to clipboard operation
presto copied to clipboard

$file_modified_time cannot be used in view

Open mlamias opened this issue 9 months ago • 1 comments

I am attempting to create a view in AWS Athena using $file_modifed_time. However, I continue to get an error that reads,

"This query ran against the "" database, unless qualified by the query. Please post the error message on our forum or contact customer support with Query Id:<queryID redacted>"

I can run the following query without any problems:

select "$file_modified_time" as last_update_date from MY_TABLE

I can also run the following create view without any problem (using $path):

create or replace view MY_VIEW as 
select "$path" as my_path from MY_TABLE

However, I cannot create a view from $file_modified_time:

create or replace view MY_VIEW as 
select "$file_modified_time" as last_update_date from MY_TABLE

without getting the error listed above. Is this a bug?

mlamias avatar May 08 '24 23:05 mlamias