Reputation: 31
I am trying to import records to bigquery table which exported from mysql.
The data is exported as csv but has to be separated by tabs '\t' as some fields store json file as string, so the normal separator won't work.
From mysql, some fields (integer
, float
) are null
but are shown as \N when exported.
For example:
123 456 '2.2.0.159' 'monday' 'London' 'GB' \N 1026 0
I am trying to replace \N as null
(also tried NULL
, Null
, all of them are not working) and upload to big query but I'm getting the following error:
Line:1 / Field:7, Value cannot be converted to expected type
What is the syntax in bigquery to allow me to import a value as null?
Many thanks
Upvotes: 3
Views: 6176
Reputation: 169
I can see that this was not handled yet as NULL or \N are caught as errors but the GBQ importer.
Upvotes: 0
Reputation: 26617
Try an empty field -- e.g. for csv, just ,,
. or for tsv, \t\t
. We should likely add support for \N if that is the syntax used by MySql.
Upvotes: 4