The pathUnit 3 · Building an agentLesson 7 of 12

Connecting your warehouse

You connect an analytics agent to your warehouse by giving it read access and syncing its metadata. The agent queries the real data, so it needs a live connection, not a copy. Once connected, it pulls the structure of your tables and columns so it knows what exists before it writes a single query.

Most agents support the common warehouses. With nao that list covers BigQuery, Snowflake, PostgreSQL, Databricks, DuckDB, Redshift, Athena, and MotherDuck. You give it credentials with read access, the same way any BI tool connects.

Syncing the metadata

A connection on its own is not enough. The agent needs to know what is in the warehouse. In nao you run nao sync, which reads the schema and pulls in table names, column names, types, and relationships.

This sync is what lets the agent reason about your data instead of guessing at it. After a sync the agent knows that an orders table exists, what columns it has, and how it links to customers.

What the agent reads

Once synced, the agent works from a few things.

  • Schema. The tables and columns, their types, and how they join.
  • Samples and stats. Enough to understand what a column actually holds.
  • Your context. The metrics, rules, and docs you layer on top, covered in the next lesson.

The schema tells the agent what is queryable. The context tells it what the data means. Both matter, and the schema sync is the first step.

Keep it practical

Start by connecting one warehouse and syncing the tables that answer your most common questions. You do not need to map everything on day one. Sync the core tables, confirm the agent can read them, then add more.

Re-run the sync when your schema changes. New tables and renamed columns will not reach the agent until you sync again, which is part of keeping the agent reliable over time. With the warehouse connected, the next step is defining metrics and rules so the answers are correct, not just runnable.