Xata logo

Serverless Postgres speaks PostgreSQL

Connect Xata to Excel, Sheets and AI

Xata Postgres over the wire protocol, addressed by database and branch. Paste the string from the Xata console and the branch you typed is the branch you get.

1connection
0inbound ports
read-onlyenforced

One connection, every surface

Where your Xata data can go

Connect Xata 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.

Guide

Xata to Excel

Microsoft Excel · Excel add-in

Pull live Xata results straight into a worksheet and refresh them on demand — desktop Excel, Excel Online, Microsoft 365.

Read the PostgreSQL guide
Guide

Xata to Google Sheets

Sheets add-on

Run a saved Xata query from the sidebar and drop the rows into the sheet. Shared collaborators can refresh it themselves.

Read the PostgreSQL guide
Guide

Xata MCP server

Claude, Cursor and MCP clients

Give an AI assistant read-only access to Xata with the schema it needs to write correct SQL — no credentials in the chat.

Read the PostgreSQL guide
Guide

Xata REST API

HTTP endpoint

Publish a Xata 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 guide
Guide

Xata to Airtable

Automation platform

Sync Xata rows into an Airtable base on a schedule, or fetch them inside an Airtable automation script.

Read the PostgreSQL guide
Guide

Xata to Baserow

Automation platform

Feed a Baserow table from Xata over the REST endpoint — self-hosted or Baserow cloud.

Read the PostgreSQL guide
Guide

Xata to SeaTable

Automation platform

Keep a SeaTable base current with Xata data without exporting a file or exposing the database.

Read the PostgreSQL guide
Guide

Xata to Smartsheet

Automation platform

Push Xata results into a Smartsheet grid so plans and reports read from the source system, not last week's export.

Read the PostgreSQL guide
Guide

Xata to Anvil

Anvil Works · App platform

Back an Anvil Python app with Xata through the REST endpoint instead of embedding database credentials in the app.

Read the PostgreSQL guide
Supported

Xata to Power BI

Power Query M

Paste the generated Power Query M into the Power BI Advanced Editor and the report reads live Xata results over HTTPS — no ODBC driver, no database port opened.

How Power BI works no Xata walkthrough written yet
Supported

Xata alerts and reports

Slack · Discord · Email · Webhook

Put a Xata 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 Xata walkthrough written yet

How it works

5 steps, no inbound firewall change

01

Install the Network Agent wherever suits you. It opens one outbound connection and never listens, so there is no inbound rule and nothing about the database is exposed.

02

Paste the connection string from the Xata console. Host, port, workspace ID, API key and the database:branch route are all read out of it.

03

Check the Database field reads database:branch — mydb:main, for example. A bare name without the colon is accepted, and it quietly means the default branch.

04

Remember which credential is which: the username is your workspace ID and the password is an API key, not your account password.

05

Save. Microsoft Excel, Google Sheets, Power BI, MCP and REST all read the branch through that one connection, or join it to your other sources in a single read-only statement.

Feature deep-dive

What Xata gives you

The Database field is a route, not a name

On every other Postgres connector the Database field holds an identifier, and Query Streams lower-cases it on the way through because that is what Postgres does with an unquoted name. On Xata that would be actively wrong, so it is the one place the rule is switched off.

  • The value is a database:branch pair — mydb:main — which Xata resolves as a route. It is not a Postgres identifier and it does not follow identifier folding rules.
  • A branch called Feature-X keeps its capital F and its capital X. Lower-cased to feature-x it stops resolving, which is why Xata is the only connector exempted from the normalisation.
  • Leave the colon out and the connection still works — it lands on the default branch. The card points this out rather than letting it pass silently, because landing on main when you meant a feature branch produces correct-looking numbers from the wrong data.
  • Nothing else about the name is checked. Query Streams passes the route through as you typed it and lets Xata decide whether it resolves.

What the agent does with a Xata host

Two behaviours are keyed to the .sql.xata.sh suffix, and neither is yours to configure.

  • TLS is required, not requested. Any .sql.xata.sh host is connected to with encryption on regardless of the Use SSL box, so a string that lost its sslmode in the clipboard still travels encrypted.
  • The connection is encrypted but the certificate chain is not verified. That is the honest description of it, and it is the same on every hosted provider Query Streams recognises.
  • There is no pooler in the path. Some serverless Postgres services put a transaction-mode pooler in front and need prepared statements pinned off to cope; Xata does not, so the agent connects directly and skips all of that.
  • The connection is saved as PostgreSQL with Xata kept as the badge. There is no connection type called Xata — which also means a plain Postgres connection you made earlier to the same host will pick up the Xata branding on sight.

Paste it rather than retyping it

Four credentials, two of which are easy to confuse and one of which is long enough to mistype. The card is built around pasting the string and catching the rest.

  • The postgresql:// URI from the console is the expected form. The libpq host= keyword form parses too.
  • Anything that is not a Postgres connection string is rejected with a message telling you where the right one lives, rather than being half-parsed into the wrong fields.
  • An API key with leading or trailing whitespace is flagged. It is a clipboard artifact and it fails as an ordinary authentication error, which sends people looking for the wrong problem.
  • Workspace ID goes in the username field and the API key goes in the password field. The card labels them that way rather than saying Username and Password and leaving you to guess.
-- Ordinary Postgres, read-only, against whichever branch you pointed at
SELECT   c.name,
         COUNT(o.id)   AS orders,
         SUM(o.amount) AS revenue
FROM     public.customers AS c
JOIN     public.orders    AS o ON o.customer_id = c.id
WHERE    o.placed_at >= now() - interval '30 days'
GROUP BY c.name
ORDER BY revenue DESC;

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 Xata to the rest of your data

One statement can span Xata 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

Xata Serverless Postgres
Microsoft SQL Server Relational engine
Stripe Payments & billing

One statement

-- nothing copied, nothing merged, nothing scheduled
SELECT   c.region, COUNT(*) AS orders, SUM(i.amount_due) AS invoiced
FROM     xata_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 Xata needs

Host
<region>.sql.xata.sh
Port
5432
Driver
Npgsql, carried by the agent — nothing to install at the Xata end
Database
A database:branch route such as mydb:main. Passed through with its capitalisation intact — the only connector where that is true
Username
Your workspace ID, not an account name
Password
An API key, not your account password
TLS
Required, and forced by the agent for every .sql.xata.sh host. Encrypted; the certificate chain is not verified
Pooling
None — Xata needs no pooled endpoint, so the agent connects directly
Saved as
PostgreSQL, with Xata kept as a badge — there is no connection type called Xata
Default schema
public, which is what a federated reference carries

The capitalisation rule is the whole reason this card exists rather than pointing people at the plain PostgreSQL one. Query Streams lower-cases Postgres database names on the way through, which is correct everywhere else — an unquoted identifier folds to lower case in Postgres, so preserving what someone typed would only create confusion. Xata's Database field is not an identifier at all. It is a route made of a database and a branch joined by a colon, and Xata reads the branch part literally. Fold it and a branch named Feature-X becomes feature-x and stops resolving. So Xata is exempted, and it is the only connector on the platform that is.

The failure that exemption prevents is a nasty one, because it does not look like a failure. Branch routing that goes wrong does not usually error — it lands you somewhere. A query against the wrong branch returns rows, and they look like data, and nothing about the result says you are reading last month's schema instead of this week's. The same reasoning is why a bare database name without a colon gets flagged: it works, it silently means the default branch, and a spreadsheet full of main when you meant a feature branch is worse than an error message.

For a cross-source query Xata is ordinary Postgres. A connection you called xata_app is written xata_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. The branch you chose in the connection is the branch the join reads.

Vendor documentation: xata.io

FAQ

Questions about Xata

Which tools can read Xata 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 Xata 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 Xata?

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 Xata?

A reachable host, a role and its password — the agent carries the driver, so nothing is installed on the database. Host: <region>.sql.xata.sh. Port: 5432. Driver: Npgsql, carried by the agent — nothing to install at the Xata end. Database: A database:branch route such as mydb:main. Passed through with its capitalisation intact — the only connector where that is true.

Can I join Xata to another database in the same query?

Yes — that is a federated query. One statement can reference Xata 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 Xata different from connecting PostgreSQL?

Only the connection string. Xata speaks the PostgreSQL wire protocol, so filters, scheduling, sharing, the Excel and Google Sheets add-ons and the MCP server all behave identically. The Xata card pre-fills the host, port and SSL settings that provider expects.

Is there a Xata to Excel guide?

Yes — it is the PostgreSQL guide, and it is correct for Xata as written. Xata speaks the PostgreSQL wire protocol, so Xata to Excel, Xata to Google Sheets and every other destination follow the same steps. The only Xata-specific part is the connection string, and the Xata card fills that in for you.

Put Xata 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