Shivkumar kondi
Shivkumar kondi

Reputation: 6792

how to load data into BigQuery with caret(^) delimiter

I have went through documentation for all the supported file types in BQ. But I came into this issue.

Consider, I have a sample compressed file .gz with format as -

filetype :

col1^col2^col3
d1^d2^d3

Command:

bq load --source_format=CSV projectId:dataset.table gs://bucket/*.gz

when I upload the file with GUI with auto schema, it loads the data properly. but when I try for bq load cmd it fails, saying -

Error :

Error while reading data, error message: CSV table references
column position 63, but line starting at position:0 contains only 1
columns.

any idea about caret delimited files?

thanks

Upvotes: 0

Views: 1131

Answers (1)

koma
koma

Reputation: 6566

bq load --help

shows that there's an option :

-F,--field_delimiter: The character that indicates the boundary between
    columns in the input file. "\t" and "tab" are accepted names for tab.

to indicate the field delimiter

Upvotes: 1

Related Questions