Articles | C2C

Running Queries using External Data Source on PostgresSQL and BigQuery

Written by Rajeev Bagra | Dec 14, 2022 6:00:00 AM

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.