<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

Data Analytics

Generative AI: Are You Behind?!

Review the latest insights from the AI Readiness Report.
By Bruno Aziza
Industry Solutions

Make "Gen AI Work": Landscape, SLMs vs. LLMs, Cost & More...

Discover the 5 metrics you need to know in order to be an exceptional CEO and Operator.
By Bruno Aziza
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