# Mode Analytics Export Integration

You can run queries in Mode Analytics and send reports generated from the queries to Treasure Data.

## Prerequisites

- [Mode Analytics](https://modeanalytics.com/) account
- Basic knowledge of Treasure Data
- Requires access to the new Presto-specific JDBC/ODBC API, currently in Private Beta. Contact your account representative if you’d like access to this new feature.


## Retrieve Treasure Data API Key

Retrieve the Treasure Data API key from the TD [Console’s profile page](https://console.treasuredata.com/app/users/current). The key must be the API key type `master`.

## Connect a Database

Connect to Treasure Data from Mode. Click your profile icon button on the menu, and click `Connect a Database` menu.

![](/assets/image-20191016-202308.bcc498775fd89035f88f52ae03d9206b10ec7ecfd927ad7a4d6f128e2fd467a0.934a2433.png)

Then, select Database in the Cloud tab.

![](/assets/image-20191016-202525.a687aabb216381d075877be60c1d3f3afc20e782cf88e2b0f4f634330c8fb2bf.934a2433.png)

You’ll find Treasure Data Presto in the database list. Click Treasure Data Presto.

![](/assets/image-20191016-202505.d839d47fe26ca06aae0f3345aba4344caa4c8d4b3d7f622125b8cf1ed62f61f1.934a2433.png)

## Set API key

After you retrieve the credential, enter the credential in the API Key field.

![](/assets/image-20191016-202247.932737673b76039d4dda73fe804b91f99b53881598214eff7e9ee91f75936d47.934a2433.png)

## Create Reports

Now it’s time to create reports! In the editor, select the database connection you’ve created. Then, execute the SQL queries, and create reports from the queries.

![](/assets/image-20191016-202237.0455a68b1de790ef9633a9c7a15839f1739fe18f2e2b14f7a3edf5657e988e9a.934a2433.png)