<img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=2634489&amp;fmt=gif">

BigQuery, Databases

PostgreSQL database and BigQuery: How to run query after connecting as External Data Source

By Rajeev Bagra | December 14, 2022

As part of my attempt to run my first SQL query using BigQuery for a PostgreSQL database, I have been able to connect as External Data Source.

 

 

Unable to figure out how to actually now run query after connecting. 

When I tried with this:

    SELECT *

    FROM accounts

This is the warning:

Table "accounts" must be qualified with a dataset (e.g. dataset.table).

 

Do I still need to create a dataset? Or what is needed to be done next. Help appreciated.

 

Best answer by malamin

Hello @DigitalSplendid ,

Thank you for your question.

This is my personal opinion of your question. Your query and error message is inconsistent.

However,


You are at the proper location to conduct the query, according to your screenshot.

  • First, make sure your query string is correct.

Look at my following screenshot, I write query based on your question and query run successfully:

 

I write query as like you did and get same error message:

 

I hope it’s working now:- If not, then, you should consider the following option.

  • Secondly, make sure the data table you prepared for the data set is active correctly. Please make sure that any external public data sources you add are included under the appropriate project if you do so.
  • If not, you should use add data to pin the data source. Click Add data next to the query editor tab in the left-hand corner. The option to "pin data" will appear; type the name of your data source and select it.

 

I'm hoping you'll be able to resolve your case. If it's not working, please describe more details here.


Recent Articles

Google Cloud Strategy

AI Cheat Sheet

AI is no more and no less the drive to create robots with human minds so they can do everything we do and more. Use this cheat sheet to help decode the space.
By Leah Zitter
AI and Machine Learning

CarCast with Bruno Aziza: What Makes Us Better Than AI?!

Unlock the secrets of human cognitive superiority over AI in this compelling CarCast with Bruno Aziza and Kenneth Cukier.
By Bruno Aziza
AI and Machine Learning

CarCast with Bruno Aziza: The Metrics You CAN'T Afford To ...

Discover essential CEO metrics: Rule of 40, CAC Ratio, NRR/GRR, and more. Optimize your business for success now!
By Bruno Aziza