Knowledge Base

Document information

Document ID: 5441
Subject: Connecting to Google BigQuery with ODBC
Creation date: 2/8/21 2:03 PM
Last modified on: 6/25/21 12:35 PM


Connecting to Google BigQuery with ODBC

Benefits

Using an ODBC connection to Google BigQuery will greatly enhance your ability to work with the database. By doing this, you add a multitude of features, but most importantly, it will make querying the database a much easier task. Additionally, you could use several third-party reporting and querying tools that are otherwise not available. In this article, we will go through the necessary steps on how to connect to Google BigQuery through ODBC. We will be using WinSQL, a powerful SQL query software to achieve this.

Connecting to BigQuery

Step 1: Download the Simba ODBC Drivers
Download the driver for your System from Google's page here: Magnitude Simba drivers for BigQuery
Step 2: Configure the Connection in WinSQL
  • Open WinSQL and go to File then click on open ODBC Manager.
  • Click on the "User DSN" tab.
  • Click "Add".
  • Select the "Simba ODBC Driver for Google BigQuery".

You will need to fill out the following fields:

Google BigQuery WinSQL

Field Description
Data Source Name/Description This is a friendly name you want to apply to this Data Source.
Authentication There are two types of authentication; User and Service Authentication. Each of them has a different method of authenticating. Please take a look here to see which authentication method most benefits you.
Catalog (Project) When you successfully authenticate, you will see your projects. Click on the drop-down arrow to select the project you would like to connect to.
Dataset Select the Dataset from your project you want to connect to.

Once you specify your credentials, click the "Test" button at the bottom. If there are no issues, you should see the "SUCESS!" "Successfully connected to data source!" message.

Running Queries and Interacting with Google BigQuery

Now that we are successfully connected, we can begin running queries and modifying the database.

For example, I am adding a new pet owner who has 2 dogs and 1 cat:

Google BigQuery WinSQL 2

If I browse the data I can see that there is now a new pet owner:

Google BigQuery WinSQL 2

Using your ODBC query tool you can interact with BigQuery directly easily. The benefit is that you also get the entire suite of your chosen tool as well as a much more informative interface.

Importing Data from Excel

Once you are connected to your BigQuery in WinSQL, you will be able to see all of your tables and data within WinSQL. To begin importing data directly from Microsoft Excel, simply drag and drop the .xlsx file directly into your Tables section as seen here:

WinSQL BigQuery Excel



Add a comment to this document

Do you have a helpful tip related to this document that you'd like to share with other users?

Important: This area is reserved for useful tips. Therefore, do not post any questions here. Instead, use our public forums to post questions.

Navigation

Social Media

Powered by 10MinutesWeb.com