Duplicate records in Athena

1

Hi All,

Can anyone tell what is the root cause for the duplication of the data in Athena query results?.

for example if the underlying S3 file is having 100 records , Athena shows 200 or multiples of 100s.

we are loading the Athena table using a glue job with insert overwrite query.

Thanks in advance

質問済み 1年前270ビュー
2回答
0

Hi ,

some additional information on the S3 structure, the Athena DDL , and the glue Job and how it implements the overwrite insert would be needed to correctly answer the question.

The behaviour you describe seems to point to additional files or partitions being present in the Athena table location.

AWS
エキスパート
回答済み 1年前
  • S3 structure: CSV file with | delimiter DDL: Table is created with input format as textinputformat and outputformat as HiveIgnoreKeyTextOutputFormat along with table properties having delimiter as |. Glue job: It is a pyspark script which reads data from one S3 file convert it into dataframe , add a partition column and store it in another S3 bucket. After storing partition is added manually to Athena table using Alter table query. There are no multiple files under each partitions.

0

Looks like all the new partitions are added to the table. You should drop older partitions if you don't want to have duplicates.

profile pictureAWS
エキスパート
Tasio
回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ