Your data

Save to my database

Save to my database writes the items of a run into a table of your own database: PostgreSQL, BigQuery or Snowflake. Each field goes into the column of the same name, so a table with name, city, rating and place_id columns gets exactly those, and fields without a column are left out. It can add new rows, or add and update rows by a key column, so the same place found again updates its row instead of adding a second one. Your data team gets fresh places, leads or incidents in the warehouse they already use, every run.

In the editor: Saves the items into a table of your own database (PostgreSQL, BigQuery or Snowflake): each field goes into the column of the same name, the others are left out. Adds new rows, or adds and updates rows by a key column. Up to 5,000 rows a run. Writes only in real runs; test runs show what would be written.

Settings

Database

An account you connect

A PostgreSQL, BigQuery or Snowflake connection from the Connections page. The connection must have Save to my database set to Allowed (whoever manages it sets this on the Connections page; connections are for reading until then), and its sign-in needs the right to add (and, to update by a key, to change) rows in the table.

Table

Text

The table to write to. It must already exist: the block never creates, changes or drops a table.

The table must already exist. PostgreSQL: schema.table (public when left out). BigQuery: dataset.table. Snowflake: database.schema.table, or the connection’s database and schema.

Needed before the flow can run.

Rows

Pick one

Add new rows every run, or add and update by a key column.

  • Add new rows Each item becomes a new row. Put Only new before it to add each place once.
  • Add or update by a key A row with the same key is updated, a new key is added. PostgreSQL needs a unique index or primary key on the key column; Snowflake uses MERGE; BigQuery adds rows only.

Key column

Text

The column that tells rows apart, such as place_id. A row whose key is already in the table is updated; the others are added.

A row whose key is already in the table is updated, others are added. PostgreSQL needs a unique index or primary key on it. Not available on BigQuery.

Needed before the flow can run.

Only these fields (optional)

Text

Leave it empty to write every field that has a column of the same name, or list the fields to write.

Separate with commas. Empty: every field that has a column of the same name.

What comes out

Each item that leaves the block carries these fields, to use in the blocks after it as {{field}}.

The items, unchanged

What it writes goes to your database; the items go on to the next block as they came.

  • every field: Unchanged.

How to use it

Enterprise data teams

New places into the warehouse every morning

A data team wants every new cafe in three cities in its BigQuery warehouse for its dashboards.

Only new keeps each place to one row; the columns name, city, rating and place_id are filled from the fields of the same name.

B2B sales

A leads table kept up to date

A sales operations team keeps its prospects in PostgreSQL and wants their ratings and phones refreshed every week.

Add or update by place_id: a known restaurant gets its new rating and phone, a new one gets a new row.

Logistics

Road closures logged for planning

A delivery company keeps every road closure in Snowflake to plan routes and look back at delays.

Each closure is added once, with its street, district and position.

Recruitment

Hiring companies for the CRM team

The CRM team syncs the table into its CRM; a company hiring again updates its row.

Banking and payments

Merchant checks written back

The answer and the map details go back into the risk table the onboarding team already reads.

Government and cities

Weather at every site, kept

A daily row per site builds a weather history next to the sites in the same database.

Good to know

  • It writes only in real runs: a schedule, a webhook call, Run once, or a live flow with sending on. A test run says how many rows it would write.
  • Each field goes into the column with the same name (capitals, spaces and symbols aside); the step names the fields that had no column.
  • Values are always sent as values, never pasted into the statement, and table and column names are checked and quoted, so nothing in an item can change what runs.
  • Up to 5,000 rows a run. PostgreSQL writes all of them or none (one transaction); BigQuery says how many rows the table refused.
  • The database must be reachable on the public internet. Snowflake needs a key pair on the connection.
  • Free: writing to your own database costs no credits.

Works well with

  • Only new: Lets through only the items this flow has not found before, so a daily flow sends only what is new.
  • Map business scan: Finds businesses on online maps live: name, category, rating, address, phone, website and whether it is open.
  • Database query: Reads rows from your own database with a SELECT query: PostgreSQL, BigQuery or Snowflake.
  • What changed: Lets through only the places this flow found before whose details changed since: closed, a rating that moved, a new phone or website, a new name or address, or any field you name.
  • Traffic incidents: Road closures, roadworks and other incidents on online maps right now, with where they are.
  • Job postings: Live job postings: who is hiring, for what, and where.

Templates that use it

Help articles

Industries that use it

Investors & consultants · Banking & lending · Telecom

Try it

Build a flow with Save to my database on the home page, no account needed, or book a call. Try it live