Agent Builder - Chat - Bigquery table import JSON error


Hi all,

I am encountering the following error message:

"invalid JSON in google.cloud.discoveryengine.v1main.Document, near 1:12 (offset 11)."

I have a BigQuery table with basic columns such as Team, Team Lead, and Email Address. I exported this table in Newline-delimited JSON format to Google Cloud Storage, and the JSON file is now visible in my bucket. On the Agent Builder platform, I created a chatbot and attempted to import the JSON file from the bucket. However, when I import the file, I receive the above error message.

I would greatly appreciate your assistance.

Thank you for your time.

 

0 2 39
2 REPLIES 2

Hi @Nabeel_753,

Welcome to Google Cloud Community!

Based on the error, this usually happens if the JSON format is incorrect. For example, if the expected character is {, the JSON should start with { instead of ". Another workaround is to try modifying the JSON file to be in one line (e.g no new line characters). Each line in the input file is supposed to be a single JSON object. For more information, you may check out the documentation.

Hope this helps.

Dear @cassandramae,

Thank you so much for your help and support.

Below is my JSON file, which is returning the error message - "invalid JSON in google.cloud.discoveryengine.v1main.Document, near 1:12 (offset 11)."

{"Project":"24742","Project_Description":"TEST","Manager_Name":"Tom"}

If I understand correctly, I need to remove the {  bracket. 

Thankful for your time and support.