简体   繁体   中英

Athena - CTAS file name

I used Athena's CTAS and INSERT commands and Avro files created at the external_location But the file name is very strange and the filename extension also disappear. (That file don't have any filename extension. File has only their strange filename like hash code) How can I define filenames rule for Athena's file? Thank you.

As stated on page 20 of AWS Athena's manual, ... "This location in Amazon S3 comprises all of the files representing your table. For more information, see Using Folders in the Amazon Simple Storage Service Console User Guide." ...

Reference : https://docs.aws.amazon.com/athena/latest/ug/athena-ug.pdf

So, no, you can't define the name of the file (or files, because more than one may be needed to represent a table). BUT THE RIGHT WAY TO THINK is that the BUCKET/PATH is what represents the file name, or the output table.

We might get confused because you're genereting and AVRO file, which really is a file, like PARQUET, but remember that Athena can also output to other formats, which may be multi-file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM