1 Answer
- Newest
- Most votes
- Most comments
0
Hi Rahul,
You are not missing any parameter. Athena accepts mixed case in DDL and DML queries, but lower cases the names when it executes the query. Reference: Name databases, tables, and columns
If you are not able to design your application around lower case, then the most reliable workaround is to rename columns after export using tools that support Parquet schema modification:
AWS Glue ETL Job
Read the Parquet files and write them back with renamed columns.
Reference: AWS Glue Developer Guide
Apache Spark
Use PySpark or Scala to read and rename columns.
Reference: Apache Spark Documentation
Pandas (Python)
For smaller datasets:
import pandas as pd df = pd.read_parquet('s3://bucket/path/') df.rename(columns={'abcde': 'abcDe', 'fghij': 'fghIj'}, inplace=True) df.to_parquet('s3://bucket/new-path/')
Reference: Pandas Documentation
Additional References
Relevant content
asked 3 years ago
asked 4 years ago
- AWS OFFICIALUpdated a year ago
