0

I am having some issues with BigRQuery not recognizing the useLegacySql=false argument in my query_exec() function.

My call looks like query_exec(query, project = project, useLegacySql = FALSE, max_pages = Inf)

I have a few issues:

1) When attempting a workaround by passing "#standardSQL..." in the query I get the error

Error: 1.979 - 1.979: No query found

2) When I pass useLegacySql = false I get:

Error: 1.1 - 1.966: Unrecognized token UNION. [Try using standard SQL....]

3) I have also tried this with use_Legacy_Sql = false with the same error:

Error: 1.1 - 1.966: Unrecognized token UNION. [Try using standard SQL....]

Is this a bug?

Ric S
  • 9,073
  • 3
  • 25
  • 51
Mike G
  • 533
  • 4
  • 12

1 Answers1

2

As presented in your question you still didn't use the input:

query_exec(query,
           project,
           ...,
           use_legacy_sql = FALSE)

You used use_Legacy_Sql instead of use_legacy_sql, I wonder if this is making a difference.

Ric S
  • 9,073
  • 3
  • 25
  • 51
Willian Fuks
  • 11,259
  • 10
  • 50
  • 74
  • Sorry for the confusion, to my knowledge the input is complete. I edited the main comment to include it. Thanks – Mike G Sep 20 '17 at 08:33
  • what I tried to suggest here is trying the input `use_legacy_sql` in lower case as it's expected by the function contract. – Willian Fuks Sep 20 '17 at 08:42
  • Using the lower case worked!! Thank you so much. I owe you some beers! – Mike G Sep 20 '17 at 08:51
  • 1
    Isn't this a dupicate of https://stackoverflow.com/questions/46275367/query-text-specifies-use-legacy-sqlfalse-while-api-options-specifytrue? – Graham Polley Sep 20 '17 at 11:42