Connect and Transfer Data from Google Sheets to BigQuery

Are you looking to seamlessly connect and transfer data from Google Sheets to BigQuery? Look no further! In this article, we’ll walk you through the step-by-step process to make this data integration a breeze. So grab your favorite beverage and let’s dive in!

Step 1: Navigate to your BigQuery account

To get started, head over to your BigQuery account by clicking on this link. Make sure you’re logged in with your Google account for a smooth experience.

Step 2: Create a new project

Click on the drop-down menu at the top of the page and select “New Project.” Give your project a catchy name like “Google Sheets” and make the project ID something easily recognizable. Once you’re done, hit the “create” button.

Step 3: Select your project

Click on the “SELECT PROJECT” link on the top right-hand side of your screen. Locate your project ID and click on it to proceed.

Step 4: Create a dataset

Now, let’s create a dataset to store your Google Sheets data. Click on the “CREATE DATASET” button on the top right-hand side of your screen. Give your dataset a name like “Google_Sheets_Dataset” and hit the “Create dataset” button.

Step 5: Create a table

We’re almost there! Click on the name of your new dataset and then click on the “create table” button. This table will be used to store the data from your Google Sheets.

Step 6: Connect to Google Sheets

In the “Create table from” drop-down menu, select “Drive” as the source. This will allow you to connect directly to your Google Sheets.

Step 7: Copy the Google Sheets URL

Navigate to the Google Sheets document that contains the data you want to transfer to BigQuery. Copy the sheet URL.

Step 8: Paste the URL

Back in BigQuery, paste the Google Sheets URL in the designated text field below “Select drive URL.”

Step 9: Set file format

Make sure to set the file format to “Google Sheet” to ensure seamless data transfer.

Step 10: Define the cell range

Enter the cell range that corresponds to the sheet and cell range in your Google Sheets document that you want to create a table from. Be cautious with this step, as an incorrect cell range can lead to unexpected data or query failures.

Step 11: Define the table name

Give your table a name like “Traffic_Data_Table” to easily identify it in BigQuery.

Step 12: Define the table schema

Before we move forward, it’s essential to define the schema for our new table. Click on the “+Add field” button to include fields in your schema. Make sure to set the appropriate data types for each field.

Step 13: Create the table

Once you’ve defined the fields and data types, click on the “Create table” button to finalize the process.

Step 14: Query your data

Now that your table is set up, it’s time to run queries on your Google Sheets data. Click on the name of your data table and then select the “QUERY TABLE” button. Enter your SQL statement(s) and hit the “Run” button.

Step 15: Save your query results

If your table schema was set up correctly, your query will run successfully, and you’ll be able to see the results from your Google Sheets document. To save these query results, click on the “SAVE RESULTS” button. Choose to save the data to a BigQuery table.

Step 16: Enjoy the fruits of your labor

Congratulations! You have successfully connected and transferred data from Google Sheets to BigQuery. Now, you can easily access and analyze your data using the power of BigQuery.

To learn more about data integration and management, visit Crawlan. We have a treasure trove of articles and resources to help you optimize your data processes.

Happy analyzing!

Related posts