How to store the Athena Query Results in DynamoDB table?

0

Hello, recently working on a project that includes querying with Athena. What I wanted to achieve is to store the Athena results in a DynamoDB table with some meta-data.

mrrizvi
質問済み 5年前947ビュー
4回答
0

Hi,
One approach you can take is to run the Athena Query with the ResultConfiguration set to send the results to an S3 bucket. You can then create a lambda function that triggers on new s3 objects in this bucket and then reads in the results, adds the meta-data and then inserts the data into DynamoDB.
-randy

回答済み 5年前
0

Speaking to why I want this is I have some Webpage that includes charts and whenever a user visits that webpage some API calls happen and Athena queries run on S3 data to fetch the data and then load that result data in charts and show it to the user. The data stored in S3 changes every week so let's say within a week if any user that visits the webpage sees the same data on charts no matter how many times he/she visits the webpage. So querying again & again the same data is not a cost-effective way when we already know the output would be the same within a week. So what I wanted to do is store the results in DynamoDB table a single time with a TTL & then check that if there is data in DynamoDB then directly fetch the data & perform some other functions.

Will this be a good approach to use DynamoDB in such a use case?

mrrizvi
回答済み 5年前
0

Hi,
Yes, that sounds like a reasonable implementation for your use case.
-randy

回答済み 5年前
0

Hello, Thanks for the answer and suggestions.

mrrizvi
回答済み 5年前

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

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

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

関連するコンテンツ