Problem Note 65422: Inserting a string that contains an embedded apostrophe into BigQuery via JDBC returns the error "…Execute error: … Error executing query job"
When you insert character data into a Google Cloud BigQuery table, a syntax error occurs under the following circumstances
- The character value contains an embedded apostrophe or single quotation mark (for example, "O'Neil").
- The SAS® library uses the SAS/ACCESS® Interface to JDBC (SASIOJDB) engine.
- The target table is in Google Cloud BigQuery.
When you insert a string like "O'Neil", the error message includes the second part of the string (in this example, "Neil"):
ERROR: Execute error: [Simba][BigQueryJDBCDriver](100032) Error executing
query job. Message: Syntax error: Expected ")" or "," but got string literal 'Neil' at [1:53]
Workarounds include the following:
- Pre-process the data to remove any embedded apostrophes and quotation marks.
- Use SAS/ACCESS® Interface to ODBC.
- Use SAS/ACCESS® Interface to Google BigQuery.
Click the Hot Fix tab in this note to access the hot fix for this issue.
Operating System and Release Information
SAS System | SAS/ACCESS Interface to JDBC | Microsoft® Windows® for x64 | 9.4 | 9.41 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows 8 Enterprise 32-bit | 9.4 | 9.41 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows 8 Enterprise x64 | 9.4 | 9.41 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows 8 Pro 32-bit | 9.4 | 9.41 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows 8 Pro x64 | 9.4 | 9.41 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows 8.1 Enterprise 32-bit | 9.4 | 9.41 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows 8.1 Enterprise x64 | 9.4 | 9.41 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows 8.1 Pro 32-bit | 9.4 | 9.41 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows 8.1 Pro x64 | 9.4 | 9.41 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows 10 | 9.4 | 9.41 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows Server 2012 Datacenter | 9.4 | 9.41 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows Server 2012 R2 Datacenter | 9.4 | 9.41 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows Server 2012 R2 Std | 9.4 | 9.41 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows Server 2012 Std | 9.4 | 9.41 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows Server 2016 | 9.4 | 9.41 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows Server 2019 | 9.4 | 9.41 | 9.4 TS1M6 | 9.4 TS1M7 |
Windows 7 Enterprise 32 bit | 9.4 | 9.41 | 9.4 TS1M6 | 9.4 TS1M7 |
Windows 7 Enterprise x64 | 9.4 | 9.41 | 9.4 TS1M6 | 9.4 TS1M7 |
Windows 7 Home Premium 32 bit | 9.4 | 9.41 | 9.4 TS1M6 | 9.4 TS1M7 |
Windows 7 Home Premium x64 | 9.4 | 9.41 | 9.4 TS1M6 | 9.4 TS1M7 |
Windows 7 Professional 32 bit | 9.4 | 9.41 | 9.4 TS1M6 | 9.4 TS1M7 |
Windows 7 Professional x64 | 9.4 | 9.41 | 9.4 TS1M6 | 9.4 TS1M7 |
Windows 7 Ultimate 32 bit | 9.4 | 9.41 | 9.4 TS1M6 | 9.4 TS1M7 |
Windows 7 Ultimate x64 | 9.4 | 9.41 | 9.4 TS1M6 | 9.4 TS1M7 |
64-bit Enabled AIX | 9.4 | 9.41 | 9.4 TS1M6 | 9.4 TS1M7 |
64-bit Enabled Solaris | 9.4 | 9.41 | 9.4 TS1M6 | 9.4 TS1M7 |
HP-UX IPF | 9.4 | 9.41 | 9.4 TS1M6 | 9.4 TS1M7 |
Linux for x64 | 9.4 | 9.41 | 9.4 TS1M6 | 9.4 TS1M7 |
Solaris for x64 | 9.4 | 9.41 | 9.4 TS1M6 | 9.4 TS1M7 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
When you use SAS/ACCESS® Interface to JDBC to insert a string to BigQuery, if the string contains an embedded single quotation mark or apostrophe, this error occurs: "Message: Syntax error: Expected ")" or "," but got string literal 'part-of-string-after-apostrophe-or-quotation-mark"
Type: | Problem Note |
Priority: | high |
Date Modified: | 2020-02-10 14:34:49 |
Date Created: | 2020-01-23 12:10:43 |