Welcome to the Alteryx Knowledge Base

Google BigQuery Error with Hyphens in SQL Query
user

Created/Edited - 12/6/2024 by Henriette Haigh | Alteryx

Summary
A query from Google BigQuery is throwing an Invalid Query error due to an unescaped hyphen in a project, dataset or table.
Description

When clicking the Test Query button in the SQL Editor in the Input tool, an Invalid Query error is thrown.
 

Invalid Query: Syntax error: Unexpected "-"

or

Invalid Query: Syntax error: Expected end of input but got "-"

 

Issue
Receive an error when clicking the Test Query button when using SQL Editor to query Google Big Query
Environment
  • Alteryx Designer 2023.1 and newer
  • Simba Google BigQuery ODBC driver 2.4.6 or newer
Resolution

Make sure projects, datasets, and table names are quoted.

For example:

Select * from `project-with-hyphen`.`dataset`.`table-name`
Was this article helpful?