gogoogle-bigquerygoogle-cloud-storage

Does BigQuery support CSV files with CRLF (\r\n) line endings?


I'm using google.golang.org/api/bigquery/v2 package to import CSV files from GCS into BigQuery. The CSV file is using CRLF (\r\n) as the line separator.

Can BigQuery correctly parse CSV files that use CRLF (\r\n)?

I've searched the docs but couldn't find a clear statement about this.


Solution

  • \r\n should be just fine.

    BQ doc refers to RFC 4180, which says:

    1. Each record is located on a separate line, delimited by a line break (CRLF).

    The document in turn refers to RFC 2234, which defines:

    CRLF = CR LF ; Internet standard newline