Vivek Aditya
Vivek Aditya

Reputation: 1173

Big Query Table Creation Confusion

I have to create a big query table with the schema as follows

snippet:STRING,comment_date:TIMESTAMP

And i have data as follows

"Love both of these brands , but the "" buy a $100k car , get or give a pair of $40 shoes "" message seems .",2015-06-22 00:00:00

"All Givens Best Commercial Ever",2015-06-22 00:00:00

I was confused because both the rows were accepted and were inserted in the table although in the first line all the snippet string is in between the double quotes but it also contains double quotes and comma in between

Why does not big query get confused there ?

Upvotes: 1

Views: 147

Answers (1)

Jeremy Condit
Jeremy Condit

Reputation: 7046

When parsing CSV, BigQuery splits only on unquoted commas, and it treats double quotes "" as a single escaped quote character " when encountered inside a quoted string. So your input is valid CSV according to BigQuery.

Upvotes: 1

Related Questions