Connect your BI tool
Your BI tool connects to the analytics copy with a read-only login: a database user name and password that can read your tables but can’t change anything. Set up analytics first. See How the analytics copy works.
Get the connection details
- Open the app and go to the BI connection tab.
- Choose your tool. VaultLens shows step-by-step instructions with your details filled in.
- Click Show password where the steps ask for it. Only owners and admins can do this, and each view is recorded in the audit log. Members should ask an owner or admin.
Every connection needs SSL. No client certificate is needed.
Every table has a _deleted_at column. Filter on _deleted_at IS NULL to hide records deleted in Knack. The tab also shows an example query that joins two connected tables in your app.
To change the password, click Rotate password. Every BI tool using the old password is signed out, so update them with the new one.
If you use your own Postgres and VaultLens couldn’t create a read-only login, connect with your own database credentials instead. If your database has a firewall, allow VaultLens’s outbound IP addresses, listed on the same tab.
Power BI Desktop
- Click Get Data → Database → PostgreSQL database → Connect.
- Enter the Server and Database, keep Data Connectivity mode on Import, and click OK.
- Choose the Database tab on the left, enter the User name and Password, and click Connect.
- In the Navigator, expand your schema, tick the tables you want and click Load.
For hosted databases, the Server is VaultLens’s secure endpoint, which has a standard certificate, so there’s nothing to install. Keep encryption on.
Data Studio (formerly Looker Studio)
- Click Create → Data source and choose the PostgreSQL connector.
- On the Basic tab, fill in Host Name or IP, Port, Database, Username and Password.
- Tick Enable SSL and leave “Enable client authentication” unticked. Upload the server certificate from the BI connection tab as the Server certificate.
- Click Authenticate. Data Studio only lists the public schema, so it says there are no tables. Click CUSTOM QUERY, then pick a table on the BI connection tab and paste its ready-made query.
- Click Connect. Each data source holds one table, so repeat for each table, or join tables in the query.
Tableau Desktop
- Under Connect → To a Server, choose PostgreSQL.
- Fill in Server, Port, Database, Username and Password.
- Tick Require SSL and click Sign In.
- In the Schema list, choose your schema and drag tables onto the canvas.
Excel for Windows
- Click Data → Get Data → From Database → From PostgreSQL Database.
- Enter the Server and Database and click OK.
- Choose Database on the left, enter the User name and Password, and click Connect.
- In the Navigator, expand your schema, select tables and click Load.
Excel’s PostgreSQL connector is only in Microsoft 365 Apps for enterprise and Office Professional Plus.
Excel for Mac
Excel for Mac has no built-in PostgreSQL connector. Install a PostgreSQL ODBC driver for Mac, create a data source with your details and SSL mode require, then follow the driver’s instructions to use it in Excel. Data Studio and Tableau work on a Mac without a driver.
Google Sheets
- In your Google Sheet, click Extensions → Apps Script.
- On the BI connection tab, choose the tables to load (each gets its own tab), copy the script, paste it over everything in the editor, and save.
- Click Project Settings, then Add script property. Set Property to
VAULTLENS_PASSWORDand Value to your password. Click Save script properties. - Back in the Editor, choose
vaultlensRefreshand click Run. Approve the permissions. If Google says the app isn’t verified, click Advanced → Go to (your project). - To refresh daily, click Triggers → Add Trigger, choose
vaultlensRefresh, Time-driven, Day timer, 3am to 4am.
Reload the sheet to get a VaultLens → Refresh data menu. Each refresh replaces the tab’s contents, so build charts on other tabs. Anyone who can edit the script can see the password.
Metabase
- Go to Admin settings → Databases → Add database and choose PostgreSQL.
- Fill in Host, Port, Database name, Username and Password.
- Under Schemas, choose “Only these…” and enter your schema.
- Turn on “Use a secure connection (SSL)”, set SSL Mode to require, and click Save.
DBeaver and other tools
In DBeaver, create a PostgreSQL connection, fill in the Main tab, tick Use SSL with SSL mode require, and find your tables under Schemas. For any other PostgreSQL tool, choose Other on the BI connection tab for the plain details and a connection URI.
BigQuery destinations
BigQuery uses Google sign-in, not a password. The BI connection tab lists the dataset and, for hosted datasets, who can read it. Owners and admins can change the readers and click Save readers. Then connect from Looker Studio (Add data → BigQuery), Power BI (Get data → Google BigQuery), Tableau (Connect → Google BigQuery) or Google Sheets (Data → Data connectors → Connect to BigQuery).