Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

BigQuery external queries with union all

I want to show data in BigQuery from two external queries
I’m trying to use UNION ALL, but I’m getting the data as join
This is what I’m trying to do:

SELECT *
FROM (
EXTERNAL_QUERY("connection_path1", "query1")
UNION ALL
EXTERNAL_QUERY("connection_pat2", "query2")
)

I’m getting this error:

Syntax error: Expected keyword JOIN but got keyword UNION at 

How can I achieve UNION ALL in big-query?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Use below instead

SELECT * FROM EXTERNAL_QUERY("connection_path1", "query1")
UNION ALL
SELECT * FROM EXTERNAL_QUERY("connection_pat2", "query2")
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading