When using BULKLOAD=YES to load data to Google BigQuery, no data loads to Google BigQuery, and an error similar to the following might be displayed in the SAS log:
ERROR: Error while executing bulk load:
{Location: ""; Message: "Error while reading data, error message: CSV table encountered too many errors, giving up. Rows: 145; errors: 100. Please look into the errors[] collection for more details."; Reason: "invalid"}
In addition, the Google Console's Job History shows one or more of the following errors:
Error while reading data, error message: CSV table encountered too many errors, giving up. Rows: 145; errors: 100. Please look into the errors[] collection for more details.
Error while reading data, error message: CSV table references column position 26, but line contains only 17 columns.; line_number: 4 byte_offset_to_start_of_line: 1855 column_index: 26 column_name: "column-name..." column_type: STRING
You are loading data without specifying data format, data will be treated as CSV format by default. If this is not what you mean, please specify data format by --source_format.
Note: The column name mentioned in the console error is not necessarily the column with the CR/LF character.
This issue occurs when one or more of your character columns contains a Carriage Return and/or Line Feed, which are non-display characters with hex values of '0A'x and '0D'x.
The intermediate BULKLOAD file should contain one line per row of data being loaded, but the CRLF splits that line and causes the issue.
This workaround is valid for small data volumes. However, if volumes are large, performance might make this workaround impractical.
Remove the problem characters. For example, COMPRESS(column-name,'0D0A'x).
If you have many tables and/or columns, this workaround might be impractical, and it might be difficult to identify which columns are affected.
Contact SAS Technical Support for guidance about how to identify problem data.