Instructions for Direct Database Integration
![](https://files.readme.io/935b9a4-DDI.png)
Prerequisites:
- SSH Client: Install the PuTTY SSH client on your PC.
- Postgres ODBC Driver: Download and install the Postgres ODBC Driver on your PC.
- Static IP: Ensure you have a static IP or static IP range from which you will access the database.
Provided by Mosaic:
- SSH Key: A private SSH key for PuTTY, corresponding to a public key on Mosaic's bastion host.
- Connection Details: Database hostname, port, username, and password, along with the IP Address of the Mosaic bastion.
Part 1: Setting Up the SSH Tunnel Using PuTTY
-
Launch PuTTY:
- In the "Session" section, enter the public IP address of the Mosaic bastion.
- Set the port to 22 (default for SSH).
-
Configure SSH Key for Authentication:
- Navigate to Connection > SSH > Auth > Credentials.
- Click "Browse" to select the provided private key file.
-
Set Up Port Forwarding:
- Go to Connection > SSH > Tunnels.
- Enter 5433 in the "Source port" field.
- In the "Destination" field, type the database hostname followed by
:5432
. - Select "Local" and "Auto", then click "Add".
- You should see your newly added port forwarding in the “Forwarded ports” section, after clicking “Add”.
-
Start the SSH Session:
- Return to the "Session" page, save the session as “Mosaic DDI Connection”.
![](https://files.readme.io/52129da-image.png)
- Click "Open" to initiate the session. Enter
ec2-user
when prompted for a username.
![](https://files.readme.io/0dbcf04-image.png)
![](https://files.readme.io/cec5d9b-image.png)
Note:
Keep the PuTTY session open to maintain database access through the secure connection.
Part 2: Configuring PostgreSQL ODBC Driver
- Open ODBC Data Source Administrator and click “Add”.
![](https://files.readme.io/4d49c65-image.png)
- Select “PostgreSQL Unicode” from the list and click “Finish”.
![](https://files.readme.io/87ef282-image.png)
- Configure the connection:
- Data Source Name:
Mosaic
- Description:
Database connection for Mosaic
- Database: Provided by Mosaic
- SSL Mode:
require
- Server:
localhost
- Port:
5433
- Username and Password: Provided by Mosaic
- Data Source Name:
![](https://files.readme.io/d0aefb6-image.png)
- Click “Test” to verify the connection (ensure your PuTTY SSH session is active).
![](https://files.readme.io/7958806-image.png)
Part 3: Connecting Power BI to Mosaic Data via SSH Tunnel
- Launch Power BI and navigate to
Report
>Get Data
>ODBC
.
![](https://files.readme.io/c583d8e-image.png)
![](https://files.readme.io/d4692cc-image.png)
- Select your ODBC connection (e.g.,
Mosaic DDI
).
![](https://files.readme.io/28eaff5-image.png)
- Enter the database Username and Password, and click "Connect".
![](https://files.readme.io/0f5de57-image.png)
- Proceed to import and utilize your data as needed.
![](https://files.readme.io/3a6f2bc-image.png)
Updated 3 months ago