Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW

Qlik Replicate Google Big Query escape characters on JSON credentials

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Pedro_Lopez
Support
Support

Qlik Replicate Google Big Query escape characters on JSON credentials

Last Update:

Apr 1, 2022 5:09:24 AM

Updated By:

Sonja_Bauernfeind

Created date:

Mar 30, 2022 5:20:03 AM

You can programmatically update endpoint settings using it's JSON file, avoiding the need to manually intervene and modify the file as seen in the User Guide: Making changes to the endpoint connection information

When working with Google Big Query as the credentials themselves are in JSON format, an escape character is needed in order to avoid parsing errors. Hence the need to use "\" as an escape character before double quotes (so that it does not consider the double quote for parsing).

Similarly, there are newline characters "\n" that are part of the credentials which also need an additional escape character so that the credential is preserved intact without Parsing errors.

In the example below:

 

{
  "type": "service_account",
  "project_id": "project_id",
  "private_key_id": "8556d6442eb7913c29af6b249e9f4b7267faa7",
  "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDXIchHncmQd5eR

 

There should be added a slash as escape character "\" before the double quotes, resulting in: 

 

{
  \"type\": \"service_account\",
  \"project_id\": \"project_id\",
  \"private_key_id\": \"8556d6442eb7913c29af6b249e9f4b7267faa7\",
  \"private_key\": \"-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDXIchHncmQd5eR

 

 

The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.

 

Labels (2)
Version history
Last update:
‎2022-04-01 05:09 AM
Updated by: