nerdexam
Amazon

DAS-C01 · Question #147

A utility company wants to visualize data for energy usage on a daily basis in Amazon QuickSight. A data analytics specialist at the company has built a data pipeline to collect and ingest the data…

The correct answer is D. Update the table path to "s3://powertransformer/". The issue of an Athena query returning zero rows from a Glue table pointing to S3 data is most often caused by the table's S3 path being configured to a specific file instead of the directory containing all relevant data files.

Storage and Data Management

Question

A utility company wants to visualize data for energy usage on a daily basis in Amazon QuickSight. A data analytics specialist at the company has built a data pipeline to collect and ingest the data into Amazon S3 Each day the data is stored in an individual csv file in an S3 bucket. This is an example of the naming structure 20210707_datacsv 20210708_datacsv. To allow for data querying in QuickSight through Amazon Athena the specialist used an AWS Glue crawler to create a table with the path "s3 //powertransformer/20210707_data csv". However when the data is queried, it returns zero rows. How can this issue be resolved?

Options

  • AModify the IAM policy for the AWS Glue crawler to access Amazon S3.
  • BIngest the files again.
  • CStore the files in Apache Parquet format.
  • DUpdate the table path to "s3://powertransformer/".

How the community answered

(17 responses)
  • A
    6% (1)
  • B
    18% (3)
  • C
    6% (1)
  • D
    71% (12)

Why each option

The issue of an Athena query returning zero rows from a Glue table pointing to S3 data is most often caused by the table's S3 path being configured to a specific file instead of the directory containing all relevant data files.

AModify the IAM policy for the AWS Glue crawler to access Amazon S3.

An incorrect IAM policy would typically result in access denied errors during crawling or querying, not a successful query returning zero rows, indicating the crawler could access S3 and define the table.

BIngest the files again.

The files are already in S3 and the problem lies with how the Glue table references them, not with the data's presence or integrity. Re-ingesting files would not correct a misconfigured table path.

CStore the files in Apache Parquet format.

Converting files to Apache Parquet format can improve query performance but does not address a fundamental misconfiguration of the Glue table's S3 path, which is preventing data from being discovered and queried.

DUpdate the table path to "s3://powertransformer/".Correct

An AWS Glue table's S3 path should specify the parent directory or a common prefix where all data files for that table reside. By updating the table path to 's3://powertransformer/', Athena can correctly discover and query all daily CSV files within that directory, resolving the problem of returning zero rows.

Concept tested: AWS Glue table S3 path configuration for Athena

Source: https://docs.aws.amazon.com/athena/latest/ug/glue-tables.html

Topics

#AWS Glue Crawler#Amazon Athena#S3 Data Lake#Table Path

Community Discussion

No community discussion yet for this question.

Full DAS-C01 Practice