Here’s a concise, SEO-optimized set of MCQs on Amazon Athena, specifically focused on Query Basics and SQL Fundamentals from Chapter 2. The questions are divided into three categories: Writing Queries in Athena, Supported Data Formats, and Partitioning and Optimization Basics. Perfect for anyone preparing for interviews, certifications, or brushing up their skills.
30 Amazon Athena MCQ Questions and Answers
Writing Queries in Athena (10 Questions)
Which query language does Amazon Athena primarily support? a) NoSQL b) SQL c) MongoDB Query Language d) Python
What is the purpose of the SELECT clause in an Athena query? a) To define the data source b) To filter data c) To specify columns to retrieve d) To create partitions
In Amazon Athena, which clause is used to group data based on one or more columns? a) GROUP BY b) WHERE c) ORDER BY d) LIMIT
What is the default file size limit for a query result in Amazon Athena? a) 1 GB b) 10 MB c) 100 MB d) 1 TB
How does Athena handle case sensitivity in SQL queries? a) Column names are case-sensitive b) Table names are case-sensitive c) Keywords are case-insensitive d) All are case-sensitive
Which clause would you use in Athena to filter rows based on conditions? a) GROUP BY b) HAVING c) WHERE d) SELECT
In Athena, what happens if you execute a query with syntax errors? a) It automatically corrects the syntax b) It returns partial results c) It generates an error message d) It ignores the error and runs
Can you use JOIN operations in Athena queries? a) No b) Yes, but only INNER JOIN c) Yes, all types of JOINs are supported d) Yes, but only with Hive tables
What is the use of the LIMIT clause in an Athena query? a) To specify the number of rows to retrieve b) To limit table size c) To restrict user access d) To define column filters
Which of these functions is not available in Athena? a) COUNT b) AVG c) RANDOM d) CONCAT
Supported Data Formats (10 Questions)
Which of the following data formats is NOT supported by Amazon Athena? a) CSV b) JSON c) PDF d) Parquet
Which file format provides the best performance in Athena for large datasets? a) CSV b) JSON c) ORC d) TXT
What is the main advantage of using Parquet with Athena? a) Faster query performance b) Reduced storage cost c) Improved data visualization d) Both a and b
In Athena, which format is best for row-based access? a) Parquet b) CSV c) ORC d) JSON
Can Amazon Athena process gzipped CSV files? a) Yes b) No c) Only for files under 1 GB d) Only if partitioned
Which data format supports schema evolution in Athena? a) CSV b) Parquet c) JSON d) Excel
What is the default delimiter for CSV files in Athena? a) Comma (,) b) Tab (\t) c) Semicolon (;) d) Pipe (|)
How does Athena handle nested JSON data? a) It automatically flattens it b) Requires SQL functions like JSON_EXTRACT c) Nested JSON is not supported d) It converts it to CSV
What type of compression is supported by Parquet in Athena? a) gzip b) snappy c) lzo d) All of the above
Which format does Athena support for querying time-series data? a) Parquet b) CSV c) Apache Hudi d) ORC
Partitioning and Optimization Basics (10 Questions)
What is the primary purpose of partitioning in Athena? a) To reduce storage costs b) To organize large datasets for faster queries c) To convert data into JSON d) To enable JOIN operations
How are partitions defined in Amazon Athena? a) Based on table size b) Based on column values c) Randomly d) By query complexity
Which of the following is true about partitioned tables in Athena? a) Partitions are added automatically b) Partitions must be manually specified in the DDL c) Partitioning is not supported d) Partitioning requires a Glue job
What is the main benefit of using smaller file sizes in Athena? a) Faster query execution b) Lower cost per query c) Easier data compression d) Both a and b
What does the ANALYZE command in Athena do? a) Updates metadata for optimized queries b) Runs diagnostic tests c) Deletes unnecessary partitions d) Performs syntax validation
Can Athena query data stored in different AWS regions? a) Yes, with additional costs b) No, it must be in the same region c) Only for JSON files d) Only for Parquet files
What is the recommended practice for storing large datasets in Athena? a) Store in a single large file b) Use smaller, partitioned files c) Compress all files into a ZIP archive d) Use an unstructured format
What happens if you query a table in Athena with incorrect partition metadata? a) The query fails b) Athena automatically corrects it c) It returns inaccurate results d) Both a and c
Which optimization technique improves performance when querying Parquet files in Athena? a) Column pruning b) File splitting c) Sharding d) None of the above
How does Athena charge users? a) Based on the number of queries b) Based on data scanned c) Based on the size of datasets stored d) Based on table complexity
Answers
QNo
Answer (Option with Text)
1
b) SQL
2
c) To specify columns to retrieve
3
a) GROUP BY
4
a) 1 GB
5
c) Keywords are case-insensitive
6
c) WHERE
7
c) It generates an error message
8
c) Yes, all types of JOINs are supported
9
a) To specify the number of rows to retrieve
10
c) RANDOM
11
c) PDF
12
c) ORC
13
d) Both a and b
14
b) CSV
15
a) Yes
16
b) Parquet
17
a) Comma (,)
18
b) Requires SQL functions like JSON_EXTRACT
19
d) All of the above
20
c) Apache Hudi
21
b) To organize large datasets for faster queries
22
b) Based on column values
23
b) Partitions must be manually specified in the DDL