With its powerful and open-source database system, PostgreSQL is among the top database in the market. This relational database is highly extensible and scalable, uses the SQL language, and allows you to add custom functions using different programming languages such as C/C++, Java, etc.
The easiest and fastest way to connect your PostgreSQL database to Google Sheets. With Castodia, you can test the limits by analyzing stored data from relational databases, running and scheduling queries, and auto-refreshing data from a yearly basis down to a 1-minute frequency. Learn more.
[Update: December 2020] Users will no longer need to individually share each sheet with the Castodia service account as described in the video. Users will instead be required to authenticate with their Google Account only once and this will automatically enable auto-refresh for any sheet.
Castodia lets you pull data from your PostgreSQL database directly into Google Sheets.
To connect your PostgreSQL database, follow the steps below:
Step 1: Install the Castodia GSuite Marketplace Database Connector
Step 2: Create a Google Sheet and click "Add-Ons" within the toolbar section to access the Castodia Database Connector
Step 3: Two options will appear when you hover over the add-on: launch and settings. Click "Settings."
Step 4: Gather and enter your database connection information. There are five components needed:
Step 5: Click the "Test" button to run the database and verify your credentials
Step 6: Click the "Save" button once a green notification pops up, indicating that the add-on was successfully installed.
And that's it! Enjoy running your queries.
Suppose a sales analyst is looking to gather bi-weekly data regarding revenue for a company's newest product. The product launched worldwide three months ago and it is critical that timely information is available to make informed suggestions on how to improve the company's profitability.
They want to answer three questions:
Rather than manually exporting CSV files, the sales analyst can use Castodia's Database Connector to connect their PostgreSQL database to Google Sheets, run and save important queries, and auto-refresh their data every two weeks based on their custom schedule.
To get started, install the Castodia Add-On and access a new Google sheet. Once the PostgreSQL database is connected, you can begin to run SQL queries.
The sales analyst wanted to gather bi-weekly data. Castodia gives users the freedom to create custom schedules for queries. The sales analyst can schedule a query that pulls sales data by repeating auto-refreshes on certain months of the year. For each month, the query can run on select days as well. This will allow the sales analyst to receive bi-weekly data refreshes on Google Sheets.
Now let us answer the three sales questions:
To answer this question, paste the SQL query onto the Castodia add-on to pull necessary data from your PostgreSQL database into Google Sheets.
After compiling the data, the sales analyst can begin creating a growth and sales chart to analyze statistics within the past three months.
Alternatively, you can create geographic charts using the data from your PostgreSQL database. The sales analyst can deduct the United States as the top-performing country, with 98,220 unit sales.
Simple calculations can be created on the side as well, with no effect on any updated data tables resulting from the custom schedule.
On column I, the sales analyst can manually add a formula to show the sum of unit sales. As of June 15, the total revenue of the product is $379,035.60. The sum of unit sales will increase once the data updates in two weeks, but columns H and I will not be affected.
Set refresh frequency to every day, every few hours, or every few minutes. Down to once every 1 minute
Auto refresh data daily, weekly, monthly or yearly with fully customizable schedules
Run, save and schedule queries all from within Google Sheets using a clean and intuitive interface
Run long/complex queries that take minutes to run. Fearlessly run large queries without unexpected errors
Choose how to auto-refresh data on your spreadsheet. Smart Overwrite prevents calculations intact
Paste any SQL query and run them directly from Google Sheets. If it runs on your editor it will also run here
Try Castodia free for 14 days, no credit card required.