How to Export Snowflake Data to Google Sheets
This blog will teach you how to export Snowflake data into Google Sheets easily.
Oftentimes, Snowlake users export data manually or inefficiently from Snowflake. This leads to a number of problems:
- Poor data governance. Enforcing data security policies, quality standards, or data privacy becomes challenging.
- Time-inefficiencies. Your team can waste countless hours and resources exporting data.
- Prone to error. Your team might upload the wrong data, use inconsistent formatting, or overwrite existing data.
But it doesn’t have to be that way. In this blog, we’ve outlined three methods for exporting Snowflake data without the hassle, including step-by-step walkthroughs for each one.
Why Export Data from Snowflake?
Many data engineers and business users need to extract data from Snowflake at some point, and insert the data into spreadsheets.
By exporting data from Snowflake into Google Sheets, they can realize the following benefits:
- Collaborative data analysis. Google Sheets lets multiple users work on the same document simultaneously. By extracting data from Snowflake and importing it into Google Sheets, you can easily share it with others and seamlessly collaborate on analysis and insights.
- Data visualization. With Google Sheets’ built-in charting and visualization capabilities, creating visual representations of your data is easy. Setting up a Snowflake and Google Sheets connection allows you to build charts and graphs to better understand your data.
- Simplify data analysis. If you’re unfamiliar with SQL or Snowflake’s querying tools, extracting data from Snowflake and importing it into Google Sheets can simplify your data analysis process. You can use Google Sheets’ native functions and formulas to manipulate your data and extract insights.
- Data backup. Create backups by exporting data from Snowflake and importing it into Google Sheets. This keeps your data intact in case of issues with your Snowflake account or database.
These are some of the reasons why so many technical and non-technical team members end up exporting data from Snowflake.
Exporting Snowflake Data from Google Sheets: Top 3 Methods
Method 1: Coefficient
The fastest and most straightforward way to extract your Snowflake data and pull it into Google Sheets is with Coefficient, a Snowflake Select Technology Partner.
Coefficient is an easy-to-use, powerful solution that connects your Snowflake data tables to Google Sheets in minutes.
Follow the steps below to connect Snowflake to Google Sheets using Coefficient.
Start by downloading and installing the Coefficient add-on in the Google Workspace Marketplace.
In Google Sheets, go to the Extensions top menu tab, click Add-ons, then Get add-ons.
Search for Coefficient on the Google Workspace Marketplace popup window. Follow the prompts and instructions to complete the installation.
Once Coefficiently is successfully installed, return to the Extensions tab on the Google Sheets menu and launch the app.
You should see Coefficient running as a Google Sheets sidebar on the right side of your screen.
Now you can start pulling your Snowflake data into Google Sheets. To do this, click Import from… on the Coefficient sidebar.
Select Snowflake as your data source.
Provide the required credentials to set up the Google Sheets Snowflake connection.
Coefficient lets you connect Snowflake to Google Sheets through two main methods:
- From Tables & Columns is best for non-technical users with its intuitive User Interface (UI) via a Data Previewer that simplifies choosing data for export.
- Custom SQL Query is better suited for technical users who wish to do custom SQL queries in addition to Snowflake directly within Sheets for optimal data customization.
You can also save previous imports, exports, and settings that you can pull from the Export Library. For this example, let’s pull data from Snowflake tables and columns.
Select the tables and columns you want to include in your import from the Data Previewer. You can also include limits and filters to further customize your import and pivot and group the data, so you only import the data you need.
Click Import when you’re done, and your Snowflake data should automatically populate your Google spreadsheet.
Set your imported Snowflake data to automatically update by configuring an auto-refresh schedule.
This way, you won’t need to manually update your Snowflake data on Google Sheets when your source data changes.
This handy tool saves you time and effort while ensuring you always get live data.
Coefficient eliminates the hassles of manual data exporting by automating the core process, from importing to live data syncing.
You can connect your Snowflake account to Google Sheets and pull data into your spreadsheet within minutes.
Method 2: Manual CSV Upload
You can manually download from Snowflake and load data into Google Sheets, ideally for one-off use cases.
You can do this by writing a simple query in the Snowflake console and downloading the results in CSV format. Then, upload the CSV file to Google Sheets to start using it.
First, log in to your Snowflake account to set up a new SQL query. Click on the Worksheets tab and select + Worksheet to begin a new SQL query.
You can pull data from the table (or tables) using an SQL query within the worksheet. The query can be “select*” or a more complex one depending on your preference and the tables you wish to pull.
It’s usually good practice to include a ‘WHERE” clause in your query. Doing so limits the number of rows and ensures your CSV file size isn’t too large to upload into Google Sheets.
You can emulate the sample query below to pull marketing performance metrics group by ad source, campaign, name, and week.
Run the query by clicking the play (▶) button on the top right-hand corner of your screen.
Click the Download button in the top right corner of your result pane (below your worksheet). Remember that this is limited to only 100MB.
After downloading the CSV file, upload it to Google Sheets. Create a new sheet, select the File menu tab, then Open and Upload.
Stop exporting data manually. Sync data from your business systems into Google Sheets or Excel with Coefficient and set it on a refresh schedule.
The downside to this method is that it’s entirely manual. If you need to update your dataset, you must go through all the steps above to re-upload your new file, which is time-consuming and tedious.
You’re also limited to 100MB of data per download. You’ll need to break your dataset into smaller chunks if your entire file exceeds the limit to get everything into Google Sheets.
Method 3: Run a Python Script for Data Syncing
You can also run a Python script to export your Snowflake to Google Sheets.
To accomplish this, you can leverage Pandas. Pandas is an open source data analysis and manipulation tool, built on top of Python.
To install the Python Snowflake connector for Pandas, run this command:
pip install “snowflake-connector-python[pandas]”
Then you must also install PyArrow.
Once you install the prerequisites, refer to the Python code below to load the read data into a DataFrame.
After getting the data in the “df” dataframe variable, programmatically load it into Google Sheets.
To do this, create a destination sheet where you want to load the data.
Navigate to Google Sheets to create one. Then, use the steps below to make a service account and OAuth2 credentials using the Google API Console.
Go to the Google API Console page and create a new project by clicking the My Project option. Then select the NEW PROJECT option.
Look for Google Drive API and enable the API.
Next, navigate to Credentials, select Create Credentials, then Service Account Key.
After entering your service account details, select Compute Engine service default, then JSON, and Create.
Open the JSON file and share the spreadsheet with the listed email:
Save the JSON file in the location where you wrote your Python script. This loads the data into Google Sheets.
Install pygsheets so you can load the data into Google Sheets.
Using a Python script requires coding knowledge and also extensive debugging and maintenance.
A more practical option is a no-code data connector, such as Coefficient, to export data from Snowflake to Google Sheets.
Resources you will also love
- How to Export Data from Tableau
- How to Export Data from PostgreSQL
- How to Export Data from Looker
- How to Export Data from Zendesk
Simplify Exporting Snowflake Data from Google Sheets
Exporting data from Snowflake to Google Sheets allows users to analyze their data in a familiar interface. The steps outlined in this guide will help you export your Snowflake data to Google Sheets with ease.
If you’re interested in the easiest and quickest way to connect Google Sheets to Snowflake, look no further than Coefficient.
Connecting Snowflake to Google Sheets seamlessly streamlines data exporting, importing, and syncing.
Try Coefficient for free to pull your business data from Snowflake, Salesforce, HubSpot, and other systems into Google Sheets instantly.