Postgres to Spreadsheet

Connect Postgres to a spreadsheet in Row Zero to import and export data between your Postgres database and a blazingly fast spreadsheet.

Table of Contents

Connect Row Zero to PostgreSQL

In Row Zero click on the 'connections' icon in the upper right-hand corner and then click the button to '+ Add connection.'Databricks new data source screen in Row ZeroDatabricks add new connection screen in Row Zero

The connection requires 6 pieces of information defined below.

  1. Name - This field can be anything that helps identify the data source being connected. (e.g. "Production Data" or "Product Metrics")
  2. Host - This is the PostgreSQL address that typically takes the form of a string like 'database.mydomain.com'.
  3. Port - This is always 5432.
  4. User - This is the username for your PostgreSQL database.
  5. Password - The password used to log into your PostgreSQL Database.
  6. Database - The name of the PostgreSQL database being connected to.PostgreSQL creds name in Row Zero interface

Once all the information is entered, hit 'Test connection' to ensure the information is correct. If the test connection icon turns green and says 'Connected', proceed by clicking on '+ Add Source.'

Add PostgreSQL as source screen in Row Zero


*Note - If your database is behind a VPN or firewall, you'll need to allow the Row Zero IP addresses: 18.217.97.112 and 18.224.119.220.

Write a query to import data

Now that Postgres is connected to a spreadsheet in Row Zero, write a SQL query to pull data into the spreadsheet. First select the 'Schema' from the drop down. Write a query in the query editor. The easiest query to write is the 'select *' statement, which pulls in the entire table. Example:

select * from TABLENAME

Row Zero is equipped to handle large data sets and will easily ingest the entirety of a table. Write more complicated queries to pull in various subsets of data stored in a Postgres Database. All results will be displayed in the connected data table in the spreadsheet.

Write PostgreSQL query in Row Zero

Dynamically filter, sort, chart, and pivot Postgres

Now that Row Zero is connected to Postgres, you can use Row Zero as a powerful postgres GUI to view, slice, and analyze postgres data. Leverage all the features and functions of spreadsheets to filter, sort, pivot, and chart Postgres data instead of writing complex SQL queries, waiting for run times, or exporting postgres to CSV.

Export to Postgres

Row Zero also makes it easy to export your spreadsheet to Postgres. To export a sheet or range of cells, simply select the cells you'd like to export, right-click, select Export to, and select your Postgres database.

write-back to postgres

Select your Postgres database, schema, and name your table. Note, tables must start with "rz_". This is to prevent accidently overwriting existing tables in your database.

export to postgres table

To export a data table, connected table, or pivot table, simply click the dropdown in the top-left of the table and select Export to. Check out our video tutorial below to see exporting to postgres in action, or view our post for how to use Row Zero to import CSV files to postgres.

Ready to get started?