How to Connect BigQuery to DBeaver in PostgreSQL

Galaxy Glossary

How do I connect Google BigQuery to DBeaver?

Creates a JDBC connection so you can run BigQuery SQL from the DBeaver IDE.

Sign up for the latest in SQL knowledge from the Galaxy Team!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

Description

Table of Contents

Why connect BigQuery to DBeaver?

Running BigQuery from DBeaver lets engineers keep a single, keyboard-driven IDE while gaining autocomplete, ER diagrams, and result exports without leaving the desktop.

How do I open the BigQuery connection dialog?

Click Database ▸ New Database Connection ▸ BigQuery. If the BigQuery driver is missing, DBeaver offers to download it automatically.

What JDBC driver and URL are required?

DBeaver uses the Simba JDBC driver. The URL template is:
jdbc:bigquery://https://www.googleapis.com/bigquery/v2:443;ProjectId=<PROJECT_ID>;OAuthType=3;

Which authentication flows work best?

For interactive desktop use, pick OAuth 2.0 Installed Application. For service accounts, paste the JSON key and select OAuth Service Account.

How can I test the connection?

After filling in credentials, press Test Connection. You should see "Connected" along with driver and project details. Click Finish to save the profile.

How do I run a query once connected?

Open a new SQL editor, choose the BigQuery connection, and run familiar SQL. Autocomplete exposes datasets, tables, and columns.

Example query on ecommerce data

SELECT c.name, SUM(oi.quantity * p.price) AS lifetime_valueFROM `shop.Customers` cJOIN `shop.Orders` o ON o.customer_id = c.idJOIN `shop.OrderItems` oi ON oi.order_id = o.idJOIN `shop.Products` p ON p.id = oi.product_idGROUP BY c.nameORDER BY lifetime_value DESC;

Best practices for performance?

Enable Query Results ▸ Save to Local Cache to avoid re-billing for re-runs. Always preview a dataset’s row count before SELECT * to control costs.

What are common errors and how to fix them?

403 errors usually mean the service account lacks bigquery.readsessions.create. Garfield 404 indicates an incorrect ProjectId in the JDBC URL.

Why How to Connect BigQuery to DBeaver in PostgreSQL is important

How to Connect BigQuery to DBeaver in PostgreSQL Example Usage


SELECT p.name,
       p.stock - SUM(oi.quantity) AS stock_left
FROM   `shop.Products`   p
JOIN   `shop.OrderItems` oi ON oi.product_id = p.id
GROUP  BY p.name, p.stock
HAVING stock_left < 10
ORDER  BY stock_left;

How to Connect BigQuery to DBeaver in PostgreSQL Syntax


-- DBeaver BigQuery JDBC URL template
jdbc:bigquery://https://www.googleapis.com/bigquery/v2:443;
    ProjectId=<PROJECT_ID>;
    OAuthType=<1|2|3>;        -- 3 = Installed App, 2 = Service Account
    OAuthServiceAcctEmail=<EMAIL>;  -- needed when OAuthType=2
    OAuthPvtKeyPath=<PATH>;        -- JSON key file path

-- Example DIRECT SQL execution after connecting
-- "shop" is the BigQuery dataset
SELECT order_id, total_amount
FROM   `shop.Orders`
WHERE  order_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY);

Common Mistakes

Frequently Asked Questions (FAQs)

Is the BigQuery driver free?

Yes. Simba’s JDBC driver ships under the Apache 2.0 license and DBeaver downloads it automatically.

Can I use a service account instead of OAuth?

Absolutely. Choose OAuthType 2, provide the JSON key, and make sure the account has BigQuery User roles.

Does DBeaver cache query results?

Yes. Enable local result caching to avoid re-running cost-incurring queries.

Want to learn about other SQL terms?

Trusted by top engineers on high-velocity teams
Aryeo Logo
Assort Health
Curri
Rubie Logo
Bauhealth Logo
Truvideo Logo
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.