# Visualize MongoDB data from Amazon Quick Sight using Amazon Athena Federated Query

**URL:** <https://community.amazonquick.com/t/visualize-mongodb-data-from-amazon-quicksight-using-amazon-athena-federated-query/3817>\
**Category:** Blogs\
**Created:** [May 25, 2022, 4:52pm UTC](https://community.amazonquick.com/t/visualize-mongodb-data-from-amazon-quicksight-using-amazon-athena-federated-query/3817 "2022-05-25T16:52:04Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![amazonquick](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/amazonquick/32/33495_2.png) [@amazonquick](https://community.amazonquick.com/u/amazonquick)\
**Post date:** [May 25, 2022, 4:52pm UTC](https://community.amazonquick.com/t/visualize-mongodb-data-from-amazon-quicksight-using-amazon-athena-federated-query/3817/1 "2022-05-25T16:52:04Z")

</div>

In this post, you will learn how to use [Amazon Athena Federated Query](https://docs.aws.amazon.com/athena/latest/ug/connect-to-a-data-source.html) to connect a MongoDB database to [Amazon Quick Sight](https://aws.amazon.com/quicksight/) in order to build dashboards and visualizations.

[Amazon Athena](http://aws.amazon.com/athena) is a serverless interactive query service, based on [Presto](https://aws.amazon.com/big-data/what-is-presto/), that provides full ANSI SQL support to query a variety of standard data formats, including CSV, JSON, ORC, Avro, and Parquet, that are stored on [Amazon Simple Storage Service](http://aws.amazon.com/s3) (Amazon S3). For data that isn’t stored on Amazon S3, you can use Athena Federated Query to query the data in place or build pipelines that extract data from multiple data sources and store it in Amazon S3. With Athena Federated Query, you can run SQL queries across data that is stored in relational, non-relational, object, and custom data sources.

MongoDB is a popular NoSQL database option for websites and API endpoints. You can choose to deploy MongoDB as a self-hosted or fully-managed database. Databases are a popular choice for UI applications for managing user profiles, product catalogs, profile views, clickstream events, events from a connected device, and so on. Quick Sight is a serverless business analytics service with built-in machine learning (ML) capabilities that can automatically look for patterns and outliers, and has the flexibility to embed dashboards in applications for a data-driven experience. You can also use [Quick Sight Q](https://aws.amazon.com/quicksight/q/) to allow users to ask questions using natural language and find answers to business questions immediately.

## Overview of Athena Federated Query

Athena Federated Query uses data source connectors that run on [AWS Lambda](http://aws.amazon.com/lambda) to run federated queries to other data sources. Prebuilt data source connectors are available for native stores, like [Amazon Timestream](https://aws.amazon.com/timestream/), [Amazon CloudWatch Logs](http://aws.amazon.com/cloudwatch), [Amazon DynamoDB](http://aws.amazon.com/dynamodb), and external sources like Vertica and SAP Hana. You can also write a connector by using the [Athena Query Federation SDK](https://docs.aws.amazon.com/athena/latest/ug/connect-data-source-federation-sdk.html). You can customize Athena’s [prebuilt connectors](https://github.com/awslabs/aws-athena-query-federation/wiki/Available-Connectors) for your own use, or modify a copy of the source code to create your own [AWS Serverless Application Repository](https://aws.amazon.com/serverless/serverlessrepo/) package.

## Solution overview

The following architecture diagram shows the components of the Athena Federated Query MongoDB connector. It contains the following components:

- A virtual private cloud (VPC) configured with public and private subnets across three Availability Zones.
- A MongoDB cluster with customizable [Amazon Elastic Block Store](http://aws.amazon.com/ebs) (Amazon EBS) storage deployed in private subnets and NAT gateways in a public subnet for outbound internet connectivity for MongoDB instances.
- Bastion hosts in an auto scaling group with Elastic IP addresses to allow inbound SSH access.
- An [AWS Identity and Access Management](http://aws.amazon.com/iam) (IAM) `MongoDBnode` role with [Amazon Elastic Compute Cloud](http://aws.amazon.com/ec2) (Amazon EC2) and Amazon S3 permissions.
- Security groups to enable communication within the VPC.
- Lambda functions deployed in a private subnet accessing S3 buckets. Athena invokes the Lambda function, which in turn fetches the data from MongoDB and maps the response back to Athena.
- [AWS Secrets Manager](https://aws.amazon.com/secrets-manager/) through a VPC endpoint.  
 [![](https://d1wl4jav5dp96l.cloudfront.net/original/3X/5/5/5509752392cb6a8b2b9dc2d8a04097a47dc95765.png)](https://d2908q01vomqb2.cloudfront.net/b6692ea5df920cad691c20319a6fffd7a4a766b8/2022/05/24/image-57.png)

## Prerequisites

To implement the solution, you need the following:

- An AWS account to access AWS services.
- An IAM user with permission to `CreateRole`, `ListRoles`, `GetPolicy`, and `AttachRolePolicy`.
- An IAM user with an access key and secret key to configure an integrated development environment (IDE).
- A MongoDB database. You can deploy a hosted [MongoDB on Amazon EC2](https://aws.amazon.com/quickstart/architecture/mongodb/) or [MongoDB Atlas in a VPC](https://www.mongodb.com/cloud/atlas/register).
- If you don’t have a Quick Sight subscription configured, [sign up for one](https://docs.aws.amazon.com/quicksight/latest/user/signing-up.html). You can access the Quick Sight free trial as part of the [AWS Free Tier](http://aws.amazon.com/free/) option.
- A new secret in Secrets Manager to store your MongoDB user name and password.
- Data loaded into your MongoDB database. For this example, we used an [airline dataset](https://raw.githubusercontent.com/jpatokal/openflights/master/data/airlines.dat). [Load the sample data](https://docs.atlas.mongodb.com/sample-data/) either from the MongoDB command line or the MongoDB Atlas user interface, if using MongoDB Atlas.

## Configure a Lambda connector

The first step in the deployment is to set up the connector environment. Athena uses [data source connectors](https://docs.aws.amazon.com/athena/latest/ug/athena-prebuilt-data-connectors.html) that run on Lambda to run federated queries. To connect with MongoDB, use the [Amazon Athena DocumentDB Connector](https://github.com/awslabs/aws-athena-query-federation/tree/master/athena-docdb), which also works with any endpoint that is compatible with MongoDB.

To configure a Lambda connector, complete the following steps:

1. On the Athena console, choose **Data sources** in the navigation pane.
2. To view a published list of data sources for Athena, select **Amazon DocumentDB**.
3. Choose **Next**.  
 [![](https://d1wl4jav5dp96l.cloudfront.net/original/3X/8/e/8ec9c9cea09eac4c7193ae3db48dca3501c0b61b.png)](https://d2908q01vomqb2.cloudfront.net/b6692ea5df920cad691c20319a6fffd7a4a766b8/2022/05/16/BDB-2047-image002.png)
4. In the **Data source details** section, give your data source a unique name; for example, `ds_mongo`.  
 This will be the connection name that appears under Data sources for Athena.  
 [![](https://d1wl4jav5dp96l.cloudfront.net/original/3X/8/0/8018071a8808154d94e597e9251729d23a19761f.png)](https://d2908q01vomqb2.cloudfront.net/b6692ea5df920cad691c20319a6fffd7a4a766b8/2022/05/16/BDB-2047-image003.png)
5. Choose **Create Lambda function**.  
 This launches the Create function page in Lambda. The connector is deployed by using AWS Serverless Application Repository.  
 [![](https://d1wl4jav5dp96l.cloudfront.net/original/3X/d/7/d7740ad052cc124ae6bdcca66c26b5f9e9044f83.png)](https://d2908q01vomqb2.cloudfront.net/b6692ea5df920cad691c20319a6fffd7a4a766b8/2022/05/16/BDB-2047-image004.png)
6. For **SecretNameOrPrefix** , enter `mongo`.
7. For **SpillBucket** , enter `spl-mongo-athena-test`.
8. For **AthenaCatalogName** , enter `us-west-mongo-cat`.
9. For **DocDBConnectionString** (the MongoDB connection), enter the following: 

```code
mongodb://${docdb_instance_1_creds}@replace_with_mongodb_private_ip:27017/?authSource=admin&readPreference=secondaryPreferred&retryWrites=false; 
```

 
10. For **SecurityGroupIds** , choose the security group that you want to associate with the function. Make sure that the security group of the MongoDB instance allows traffic from the Lambda function.
11. For **SpillPrefix** , enter `athena-spill`.
12. For **Subnetids** , enter the subnet IDs of subnets with MongoDB instances.  
 In this case, **LambdaMemory** and **LambdaTimeout** have been set to the maximum values, but these can vary depending on the query run and memory requirements. **SpillBucket** is an S3 bucket in your account to store data that exceeds the Lambda function response size limits.
13. Keep the rest as defaults.
14. Select the acknowledgement check box choose **Deploy**.  
 The connection function is launched based on the given parameters.[![](https://d1wl4jav5dp96l.cloudfront.net/original/3X/6/7/671bd09afbab8bd59bac5b5b51de8978b197c16b.png)](https://d2908q01vomqb2.cloudfront.net/b6692ea5df920cad691c20319a6fffd7a4a766b8/2022/05/16/BDB-2047-image005.png)
15. Create a [VPC endpoint](https://docs.aws.amazon.com/vpc/latest/privatelink/vpc-endpoints-s3.html) to allow the Lambda function to access Amazon S3 through an endpoint.  
 This is for the spill bucket. The spill bucket is a staging area for copying the results of the queries that are performed on MongoDB via Athena federation. This is so that the Lambda function in the VPC can access Amazon S3.
16. Go back to the Athena console.
17. Under **Connection details** , for **Lambda function** , choose the newly created Lambda function.
18. Choose **Next.  
 [![](https://d1wl4jav5dp96l.cloudfront.net/original/3X/a/f/af1880bb867e814ae71ec095e51334643895848a.png)](https://d2908q01vomqb2.cloudfront.net/b6692ea5df920cad691c20319a6fffd7a4a766b8/2022/05/16/BDB-2047-image006.png)**  
 
19. To verify the connection, on the Athena console, choose **Data sources** , then choose `ds_mongo`.  
 Associated databases from the connection should be listed.  
 [![](https://d1wl4jav5dp96l.cloudfront.net/original/3X/f/5/f528711cee8f180c8ec65a01ed097a459d365869.png)](https://d2908q01vomqb2.cloudfront.net/b6692ea5df920cad691c20319a6fffd7a4a766b8/2022/05/16/BDB-2047-image007.png)  
 You should now be able to query the datasets from the Athena query editor by using SQL.
20. In the query editor, for **Data Source** , choose `ds_mongo`.

Athena federates the query using the connector, which invokes the Lambda function. Then the query is performed by the function on MongoDB, and the query results are translated back to Athena. The following is a sample query that was performed on the airlines dataset.  
 [![](https://d1wl4jav5dp96l.cloudfront.net/original/3X/1/5/15eced1e9fbf9f9c2767540998ff7d039bf0094e.png)](https://d2908q01vomqb2.cloudfront.net/b6692ea5df920cad691c20319a6fffd7a4a766b8/2022/05/16/BDB-2047-image008.png)

## Create a dataset on Quick Sight to read the data from MongoDB

Before you launch Quick Sight for the first time in an AWS account, you must set up an account. For instructions, see [Signing in to Amazon Quick Sight](https://docs.aws.amazon.com/quicksight/latest/user/signing-in.html).

After the initial setup, you can create a dataset with Athena as the source. The Quick Sight service role needs permission to invoke the Lambda function that connects MongoDB. The `aws-quicksight-service-role-v0 service` role is automatically created with the Quick Sight account.

To create a dataset in Quick Sight, complete the following steps:

1. On the IAM console, in the navigation pane, choose **Roles**.
2. Search for the role `aws-quicksight-service-role-v0` and [add the permission](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_manage-attach-detach.html) `Lambda _fullaccess`.  
 In an organization, there could be different data stores based on data load and consumption patterns. Examples include catalog or manual data that is associated with products in a MongoDB or key-value index store, transactions or sales data in a SQL database, and images or video clips that are associated with the product in an object store.  
 [![](https://d1wl4jav5dp96l.cloudfront.net/original/3X/e/f/ef984a694f7e9cc6132107440cbf35070ccde2d9.png)](https://d2908q01vomqb2.cloudfront.net/b6692ea5df920cad691c20319a6fffd7a4a766b8/2022/05/16/BDB-2047-image009.png)In this case, an `airlines` table from MongoDB is joined with a flat file that contains information on the airports.
3. Use the Quick Sight cross-data store feature to join data from different sources on common fields.  
 [![](https://d1wl4jav5dp96l.cloudfront.net/original/3X/d/c/dc696b6eaa1956c0f9e2a27b7e5c13b4eb0461fc.png)](https://d2908q01vomqb2.cloudfront.net/b6692ea5df920cad691c20319a6fffd7a4a766b8/2022/05/16/BDB-2047-image010.png)
4. We then update the data types for our geographic fields like fields like city, country, latitude, and longitude so we can build maps later.
5. You can also create calculated fields while preparing your dataset, which allows you to reuse them in other Quick Sight analyses.  
 [![](https://d1wl4jav5dp96l.cloudfront.net/original/3X/e/b/eb0cfe88a48ac8be3d9a3e1c76b7f8b3cb26703b.png)](https://d2908q01vomqb2.cloudfront.net/b6692ea5df920cad691c20319a6fffd7a4a766b8/2022/05/16/BDB-2047-image011.png)

With a few clicks, you should be able to [create a dashboard](https://www.youtube.com/channel/UCqtI0cKSreCwUUuKOlA1tow/videos) with the published dataset. For instance, you can plot your data on a map, show trends in a line chart, and add autonarratives from the list of Suggested Insights to create the analysis shown in the following screenshot.

[![](https://d1wl4jav5dp96l.cloudfront.net/original/3X/d/9/d9307af3611426204492d1343f22ffcc857ba31d.png)](https://d2908q01vomqb2.cloudfront.net/b6692ea5df920cad691c20319a6fffd7a4a766b8/2022/05/16/BDB-2047-image012.png)

## Clean up

Make sure to clean up your resources to avoid resource spend and associated costs. You need to delete the EC2 instances with MongoDB. In the case of MongoDB Atlas, you can delete the databases and tables. Delete the Athena data source `ds_mongo` and unsubscribe your Quick Sight account from the Manage Quick Sight admin page.

## Conclusion

With Quick Sight and Athena Federated Query, organizations can access additional data sources beyond those already supported by Quick Sight. If you have data in sources other than Amazon S3, you can use Athena [Federated Query](https://docs.aws.amazon.com/athena/latest/ug/connect-to-a-data-source.html) to analyze the data in place or build pipelines that extract and store data in Amazon S3. Athena now also supports cross-account federated queries to enable teams of analysts, data scientists, and data engineers to query data stored in other AWS accounts. Try connecting to proprietary data formats and sources, or build new user-defined functions, with the [Athena Query Federation SDK](https://github.com/awslabs/aws-athena-query-federation/blob/master/athena-federation-sdk/README.md).

* * *

### About the Author

**[![](https://d1wl4jav5dp96l.cloudfront.net/original/3X/e/0/e0c6e71c3fd7ac71db06507c4b5f1403f9bcc3c2.png)](https://d2908q01vomqb2.cloudfront.net/b6692ea5df920cad691c20319a6fffd7a4a766b8/2021/10/08/Soujanya-Konka.png)Soujanya Konka** is a Solutions Architect and Analytics specialist at AWS, focused on helping customers build their ideas on cloud. Expertise in design and implementation of business information systems and Data warehousing solutions. Before joining AWS, Soujanya has had stints with companies such as HSBC, Cognizant.

**[![](https://d1wl4jav5dp96l.cloudfront.net/original/3X/4/8/48959d338c570f8dbd8eb3132fa4c563d506bdab.jpeg)](https://d2908q01vomqb2.cloudfront.net/b6692ea5df920cad691c20319a6fffd7a4a766b8/2022/05/18/Nilesh-parekh.jpg)Nilesh Parekh** is a Partner Solution Architect with ISV India segment. Nilesh help assist partner to review and remediate their workload running on AWS based on the AWS Well-Architected and Foundational Technical Review best practices. He also helps assist partners on Application Modernizations and delivering POCs.

* * *
This is a companion discussion topic for the original entry at [https://aws.amazon.com/blogs/big-data/visualize-mongodb-data-from-amazon-quicksight-using-amazon-athena-federated-query/](https://aws.amazon.com/blogs/big-data/visualize-mongodb-data-from-amazon-quicksight-using-amazon-athena-federated-query/)

---

<div class="post-metadata">

**Author:** ![saobry](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/saobry/32/17048_2.png) [@saobry](https://community.amazonquick.com/u/saobry)\
**Post date:** [January 17, 2024, 2:02pm UTC](https://community.amazonquick.com/t/visualize-mongodb-data-from-amazon-quicksight-using-amazon-athena-federated-query/3817/2 "2024-01-17T14:02:52Z")

</div>

Is there a plan for Quicksight to have a direct connector for MongoDB?

---

<div class="post-metadata">

**Author:** ![apjvinod](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@apjvinod](https://community.amazonquick.com/u/apjvinod)\
**Post date:** [February 1, 2024, 6:23am UTC](https://community.amazonquick.com/t/visualize-mongodb-data-from-amazon-quicksight-using-amazon-athena-federated-query/3817/3 "2024-02-01T06:23:24Z")

</div>

Hi @saobry

Thanks for raising it up . Yes we are prioritising MongoDB Connector , could you please privately send the message with the organization name and aws account id to update the feature request .

Thanks  
Vinod

---

<div class="post-metadata">

**Author:** ![saobry](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/saobry/32/17048_2.png) [@saobry](https://community.amazonquick.com/u/saobry)\
**Post date:** [February 1, 2024, 10:21am UTC](https://community.amazonquick.com/t/visualize-mongodb-data-from-amazon-quicksight-using-amazon-athena-federated-query/3817/4 "2024-02-01T10:21:51Z")

</div>

@apjvinod I am unable to see the message button on your profile. Please could you message me so I can respond?

---

<div class="post-metadata">

**Author:** ![Kristin](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/kristin/32/2470_2.png) [@Kristin](https://community.amazonquick.com/u/Kristin)\
**Post date:** [February 2, 2024, 5:33pm UTC](https://community.amazonquick.com/t/visualize-mongodb-data-from-amazon-quicksight-using-amazon-athena-federated-query/3817/5 "2024-02-02T17:33:21Z")

</div>

Hi @saobry

Can you see it if you click on @apjvinod’s username in the post above?

 ![Screenshot 2024-02-02 at 9.32.02 AM](https://d1wl4jav5dp96l.cloudfront.net/original/3X/d/b/db10c7e769c9606f57cce9bee37a748a56dcc0be.png)

Thanks! - Kristin

---

<div class="post-metadata">

**Author:** ![saobry](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/saobry/32/17048_2.png) [@saobry](https://community.amazonquick.com/u/saobry)\
**Post date:** [February 5, 2024, 12:21pm UTC](https://community.amazonquick.com/t/visualize-mongodb-data-from-amazon-quicksight-using-amazon-athena-federated-query/3817/6 "2024-02-05T12:21:35Z")

</div>

The button does not appear for me

 ![image](https://d1wl4jav5dp96l.cloudfront.net/original/3X/a/3/a3a5ccf6de4b7f9539f8997e8f102c4357b5b80b.png)

---

<div class="post-metadata">

**Author:** ![Kristin](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/kristin/32/2470_2.png) [@Kristin](https://community.amazonquick.com/u/Kristin)\
**Post date:** [February 6, 2024, 2:11am UTC](https://community.amazonquick.com/t/visualize-mongodb-data-from-amazon-quicksight-using-amazon-athena-federated-query/3817/7 "2024-02-06T02:11:27Z")

</div>

Just pinged him to ask him to reach out to you, @saobry.

---

<div class="post-metadata">

**Author:** ![maitreya10](https://avatars.discourse-cdn.com/v4/letter/m/a183cd/32.png) [@maitreya10](https://community.amazonquick.com/u/maitreya10)\
**Post date:** [March 3, 2024, 6:16pm UTC](https://community.amazonquick.com/t/visualize-mongodb-data-from-amazon-quicksight-using-amazon-athena-federated-query/3817/8 "2024-03-03T18:16:40Z")

</div>

@Kristin What’s the cost associated with approach? I have 120GB of data in Mongodb.

---

<div class="post-metadata">

**Author:** ![Kristin](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/kristin/32/2470_2.png) [@Kristin](https://community.amazonquick.com/u/Kristin)\
**Post date:** [March 3, 2024, 6:18pm UTC](https://community.amazonquick.com/t/visualize-mongodb-data-from-amazon-quicksight-using-amazon-athena-federated-query/3817/9 "2024-03-03T18:18:13Z")

</div>

Hi @maitreya10! Welcome to the Community! @bergqdou Would you have an answer to this pricing question – or be able to point us in the right direction? Thx!

---

<div class="post-metadata">

**Author:** ![maitreya10](https://avatars.discourse-cdn.com/v4/letter/m/a183cd/32.png) [@maitreya10](https://community.amazonquick.com/u/maitreya10)\
**Post date:** [March 4, 2024, 5:29am UTC](https://community.amazonquick.com/t/visualize-mongodb-data-from-amazon-quicksight-using-amazon-athena-federated-query/3817/10 "2024-03-04T05:29:41Z")

</div>

@Kristin @bergqdou In the prerequisites section it’s mentioned that I need the mongo db hosted on AWS, my organization’s mongo db is hosted on Atlas’s AWS and does have a VPC, so will this approach work? Also the number of queries per day would be around 100. Thank you!

---

<div class="post-metadata">

**Author:** ![Kristin](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/kristin/32/2470_2.png) [@Kristin](https://community.amazonquick.com/u/Kristin)\
**Post date:** [March 4, 2024, 1:52pm UTC](https://community.amazonquick.com/t/visualize-mongodb-data-from-amazon-quicksight-using-amazon-athena-federated-query/3817/11 "2024-03-04T13:52:20Z")

</div>

Also adding @gillepa (who is on backlog today) to this thread. Gilbert, can you help @maitreya10? Thx!

---

<div class="post-metadata">

**Author:** ![maitreya10](https://avatars.discourse-cdn.com/v4/letter/m/a183cd/32.png) [@maitreya10](https://community.amazonquick.com/u/maitreya10)\
**Post date:** [March 7, 2024, 6:05am UTC](https://community.amazonquick.com/t/visualize-mongodb-data-from-amazon-quicksight-using-amazon-athena-federated-query/3817/12 "2024-03-07T06:05:49Z")

</div>

@bergqdou @gillepa Any updates on the same? It’s been 3 days since I last heard from you, appreciate you giving your time here, thank you!

---

<div class="post-metadata">

**Author:** ![Kristin](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/kristin/32/2470_2.png) [@Kristin](https://community.amazonquick.com/u/Kristin)\
**Post date:** [March 7, 2024, 8:35am UTC](https://community.amazonquick.com/t/visualize-mongodb-data-from-amazon-quicksight-using-amazon-athena-federated-query/3817/13 "2024-03-07T08:35:27Z")

</div>

@maitreya10 Thanks for following up – and sorry to see that you do not have an answer yet. Looping in our on call for today @n_vetri (from the Americas).

---

<div class="post-metadata">

**Author:** ![n\_vetri](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/n_vetri/32/2924_2.png) [@n\_vetri](https://community.amazonquick.com/u/n_vetri)\
**Post date:** [March 7, 2024, 12:48pm UTC](https://community.amazonquick.com/t/visualize-mongodb-data-from-amazon-quicksight-using-amazon-athena-federated-query/3817/14 "2024-03-07T12:48:17Z")

</div>

Hi @maitreya10 ,  
In Quick Sight, the cost you would incur is for the SPICE storage (if you intend to use it). There is no additional cost in Quick Sight.

However, Athena charges are based on amount of data scanned/ fetched and it could incur additional cost and will appear under Athena in your billing. You may want to check on Athena pricing.

Here is the link to Quick Sight pricing page:

> **[Amazon QuickSight Pricing](https://aws.amazon.com/quicksight/pricing/)**
>
> QuickSight is priced by user role and offers you the flexibility and simplicity to choose the pricing model that best suits your business needs. A low $3/month reader fee makes it easy for you deliver data insights at scale to the entire organization...

Regards  
Vetri

---

<div class="post-metadata">

**Author:** ![maitreya10](https://avatars.discourse-cdn.com/v4/letter/m/a183cd/32.png) [@maitreya10](https://community.amazonquick.com/u/maitreya10)\
**Post date:** [March 7, 2024, 1:43pm UTC](https://community.amazonquick.com/t/visualize-mongodb-data-from-amazon-quicksight-using-amazon-athena-federated-query/3817/15 "2024-03-07T13:43:05Z")

</div>

@n_vetri Okay, thanks!

---

<div class="post-metadata">

**Author:** ![alden\_noronha](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@alden\_noronha](https://community.amazonquick.com/u/alden_noronha)\
**Post date:** [July 3, 2024, 7:25pm UTC](https://community.amazonquick.com/t/visualize-mongodb-data-from-amazon-quicksight-using-amazon-athena-federated-query/3817/17 "2024-07-03T19:25:28Z")

</div>

Hi i was able to acquire a connection to my MongoDB database, however when i try to pull up a particular table say ‘table A’ for Data Prep I get an error` [Your database generated a SQL exception. This can be caused by query timeouts, resource constraints, unexpected DDL alterations before or during a query, and other database errors. Check your database settings and your query, and try again.]`

although when I try to pull up another table say table B it is able to preview during Data prep. is it because the no. of columns of table A is a lot more than table B. Is it because table B is properly defined while table A is constantly being updated?
