Multi-tenant Postgres speaks PostgreSQL
Connect Nile to Excel, Sheets and AI
Nile — Postgres for multi-tenant B2B apps. Reporting here sees across every tenant, which is usually the point.
One connection, every surface
Where your Nile data can go
Connect Nile once and the same read-only connection feeds all of these — no second setup, no second copy of the data. 9 of 11 have a step-by-step guide.
Nile to Excel
Microsoft Excel · Excel add-in
Pull live Nile results straight into a worksheet and refresh them on demand — desktop Excel, Excel Online, Microsoft 365.
Read the PostgreSQL guideNile to Google Sheets
Sheets add-on
Run a saved Nile query from the sidebar and drop the rows into the sheet. Shared collaborators can refresh it themselves.
Read the PostgreSQL guideNile MCP server
Claude, Cursor and MCP clients
Give an AI assistant read-only access to Nile with the schema it needs to write correct SQL — no credentials in the chat.
Read the PostgreSQL guideNile REST API
HTTP endpoint
Publish a Nile query as an authenticated JSON endpoint any application can call, with an OpenAPI 3.1 spec and ready-made Postman, Insomnia and Hoppscotch collections. No database port is opened.
Read the PostgreSQL guideNile to Airtable
Automation platform
Sync Nile rows into an Airtable base on a schedule, or fetch them inside an Airtable automation script.
Read the PostgreSQL guideNile to Baserow
Automation platform
Feed a Baserow table from Nile over the REST endpoint — self-hosted or Baserow cloud.
Read the PostgreSQL guideNile to SeaTable
Automation platform
Keep a SeaTable base current with Nile data without exporting a file or exposing the database.
Read the PostgreSQL guideNile to Smartsheet
Automation platform
Push Nile results into a Smartsheet grid so plans and reports read from the source system, not last week's export.
Read the PostgreSQL guideNile to Anvil
Anvil Works · App platform
Back an Anvil Python app with Nile through the REST endpoint instead of embedding database credentials in the app.
Read the PostgreSQL guideNile to Power BI
Power Query M
Paste the generated Power Query M into the Power BI Advanced Editor and the report reads live Nile results over HTTPS — no ODBC driver, no database port opened.
How Power BI works no Nile walkthrough written yetNile alerts and reports
Slack · Discord · Email · Webhook
Put a Nile query on a schedule and have the rows delivered to Slack, Discord, email or a signed webhook — or hold the message until a row count, threshold or percentage change crosses the line you set.
How alerts and reports work no Nile walkthrough written yetHow it works
5 steps, no inbound firewall change
Install the Network Agent on a machine that can reach the internet. It opens one outbound connection and never listens, so no inbound firewall rule is needed.
In the Nile console open the database, then Settings and Connection, and choose the PostgreSQL option.
Generate a credential if you do not have one. Nile shows the password once, at that moment, so copy it before you leave the page.
Paste the connection string into the first field. Host, port, database, username and password are read out of it.
Leave Use SSL on, test and save. Read it from Microsoft Excel, Google Sheets, Power BI, MCP or REST through that one connection.
Feature deep-dive
What Nile gives you
One database, every tenant, one query
Nile's model is the interesting part of this connector, and it changes what a reporting connection is good for.
- Nile keeps all tenants in one Postgres database and separates them with a tenant_id column on tenant-aware tables, rather than giving each customer a separate database or schema.
- Your application sets a tenant context per connection and therefore sees one customer at a time. A Query Streams connection does not set that context, so it sees across all of them.
- That makes cross-tenant reporting a plain GROUP BY rather than an integration project. Usage per customer, revenue by plan, or which accounts have not logged in this month are all one statement.
- It also means access control is yours to design. A connection here is not scoped to a tenant, so if you need per-customer reporting, filter on tenant_id in the saved query and share that query rather than the connection.
- Everything the agent runs is read-only, so nothing here can modify tenant data regardless of what the query says.
-- Cross-tenant reporting is an ordinary GROUP BY
SELECT t.name AS tenant,
COUNT(o.id) AS orders,
SUM(o.amount) AS revenue
FROM public.tenants AS t
JOIN public.orders AS o ON o.tenant_id = t.id
WHERE o.placed_at >= now() - interval '30 days'
GROUP BY t.name
ORDER BY revenue DESC;
Credentials are shown once, and regional endpoints are ordinary Postgres
Two practical notes that cover most of what happens when setting this up.
- Nile generates a credential id as the username and shows its password a single time. If you lose it, generate another rather than trying to recover the old one.
- Endpoints are regional and end in .db.thenile.dev, on the standard port 5432. There is no pooler in this path and the agent applies no pooler adaptations.
- TLS is required and the agent enforces it for Nile hostnames, so clearing the SSL checkbox does not produce an unencrypted connection. The certificate chain is not verified — read it as protection against anyone reading the traffic, not proof of which server answered.
- The pasted connection string is dropped once the fields are filled, so the password is stored in one place rather than two.
Shared by every database connector
True of every database connector
- Outbound only — the agent opens one encrypted connection out to Query Streams. No inbound port to forward, no VPN, no IP allowlist, nothing about your database exposed to the internet.
- Credentials stay put — the database username and password live on the machine you installed the agent on. Query Streams never receives them and cannot reach your database on its own.
- Read-only, enforced — one statement at a time, SELECT and friends only. A write is rejected on your own machine before it is ever sent to the server, rather than relying on a permission somebody remembered to set.
- Deploy as many agents as you like — one per site, region or cloud. Every data source they can see arrives in a single dropdown, so nobody has to know which agent hosts what.
What you get once a query is saved
- Share the capability, not the SQL — a colleague or an outside partner can run your query and change its filters without ever seeing the statement behind it.
- Filters from either direction — declare them yourself as @variables, or let the connector spot the literal values already sitting in your WHERE clause and offer those as dropdowns.
- Read it from anywhere — Microsoft Excel, Google Sheets, Power BI, the REST API, AI assistants over MCP, the Query Builder and Nova all read the same saved query.
- Run several at once — five saved queries into five worksheet tabs, streamed concurrently, however large the results.
- Join it to anything else you have connected — another database, a business API, or a folder of files, in one read-only statement.
Cross-source SQL
Join Nile to the rest of your data
One statement can span Nile and your other connections at once. Each source runs only the part it can, streams the result back, and the join happens centrally — the sources never talk to each other and nothing is copied anywhere.
3 connections · 3 agents
One statement
-- nothing copied, nothing merged, nothing scheduled
SELECT c.region, COUNT(*) AS orders, SUM(i.amount_due) AS invoiced
FROM nile_app.public.orders1 f
JOIN erp_sql.dbo.customers2 c ON c.id = f.customer_id
JOIN billing.stripe.invoices3 i ON i.customer = c.stripe_id
GROUP BY c.region
ORDER BY invoiced DESC;
The three parts are connection, schema and table — and the connection name is whatever you called it. Illustrative columns; your tables will be your tables. Read-only applies to every piece: SELECT, WITH and EXPLAIN only, with a ceiling on how much any one source may hand over for a single query. How federated queries work
Connection details
What Nile needs
- Host
- <region>.db.thenile.dev
- Port
- 5432
- Driver
- Npgsql, carried by the agent — nothing to install at the Nile end
- Paste format
- The string from Database, Settings, Connection, PostgreSQL — as a postgres:// URI
- Username
- The generated credential id from the console, not an email address
- TLS
- Required and enforced for Nile hostnames. Encrypted; the certificate chain is not verified
- Pooling
- None. The agent applies no pooler adaptations for Nile
- Tenant scope
- No tenant context is set, so the connection sees every tenant. Filter on tenant_id in the query when you need one
- Saved as
- PostgreSQL, with Nile kept as a badge
- Default schema
- public, which is what a federated reference carries
Nile is worth understanding as a reporting target specifically because of what it does not do here. The tenant isolation that makes it useful to build on is applied per connection, by the application, when it sets a tenant context. A reporting connection that never sets one is not bypassing a control — it is using the database the way the model intends for an operator who needs to see the whole estate.
The practical consequence is that the scoping decision moves into the query rather than the connection. Adding a tenant_id filter to a saved query and sharing that query gives a customer-scoped view without giving anyone the connection, which is the same pattern Query Streams uses everywhere else: share the ability to run something, not the credentials behind it.
For a cross-source query Nile is ordinary Postgres. A connection you called nile_app is written nile_app.public.orders, and it joins to a folder of CSVs, an on-premises system of record or a billing API in one read-only statement — with nothing copied and nothing scheduled.
Vendor documentation: www.thenile.dev
FAQ
Questions about Nile
Which tools can read Nile data through Query Streams?
All of them, from one connection: Excel, Google Sheets, MCP, REST API, Airtable, Baserow, SeaTable, Smartsheet, Anvil, Power BI, scheduled alerts and reports. Connect the database once and every surface reads the same read-only connection — there is no per-tool setup and no second copy of the data.
Do I have to open a firewall port to my Nile database?
No. The Query Streams Network Agent runs inside your network and opens a single outbound encrypted connection. Nothing listens for inbound traffic, no VPN is required, and the database keeps its existing firewall rules.
Can Query Streams change data in Nile?
No. The agent enforces read-only at the point of execution — one statement at a time, SELECT and friends only. Credentials stay on the agent and are never sent to Query Streams.
What does Query Streams need to connect to Nile?
A reachable host, a role and its password — the agent carries the driver, so nothing is installed on the database. Host: <region>.db.thenile.dev. Port: 5432. Driver: Npgsql, carried by the agent — nothing to install at the Nile end. Paste format: The string from Database, Settings, Connection, PostgreSQL — as a postgres:// URI.
Can I join Nile to another database in the same query?
Yes — that is a federated query. One statement can reference Nile and your other connections at once, written as connection.schema.table. Each source runs only the part it can and streams the result back; the join happens centrally, so the sources never connect to each other and nothing is copied or scheduled. Read-only applies to every piece — SELECT, WITH and EXPLAIN only — and there is a ceiling on how much any one source may hand over for a single query. Federated queries are a plan feature; the federated queries page carries the current source and size limits.
Is connecting Nile different from connecting PostgreSQL?
Only the connection string. Nile speaks the PostgreSQL wire protocol, so filters, scheduling, sharing, the Excel and Google Sheets add-ons and the MCP server all behave identically. The Nile card pre-fills the host, port and SSL settings that provider expects.
Is there a Nile to Excel guide?
Yes — it is the PostgreSQL guide, and it is correct for Nile as written. Nile speaks the PostgreSQL wire protocol, so Nile to Excel, Nile to Google Sheets and every other destination follow the same steps. The only Nile-specific part is the connection string, and the Nile card fills that in for you.
Put Nile where the work happens
Install the agent, point it at your database, and pick a destination.
Read-only Outbound only Credentials stay on the agent

