runt18 / google-bigquery

Automatically exported from code.google.com/p/google-bigquery
0 stars 0 forks source link

Added Support for \N to be recognized as NULLs fields, needed to supported CSV's generated by MySQL #206

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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

Trying to import these fields into BigQuery leads to an error. It would nice to 
add support for  `\N` to represent NULL values as that's a syntax used by 
mysql. 

See: 
http://stackoverflow.com/questions/13050296/insert-null-integer-into-google-bigq
uery
http://dev.mysql.com/doc/refman/5.0/en/null-values.html

Original issue reported on code.google.com by gary4...@gmail.com on 3 Jan 2015 at 6:11

GoogleCodeExporter commented 8 years ago
Hi, it is the same for SQL Server NULL values. Talend convert them to "\N" but 
bigquery don't accept it. Do you have a workarround?

Original comment by syll...@sfeir.com on 14 Jun 2015 at 6:17

GoogleCodeExporter commented 8 years ago
Hey BigQuery team - I am wondering if this feature has been added to the 
feature request queue?

Original comment by michael....@gmail.com on 18 Jun 2015 at 6:43

GoogleCodeExporter commented 8 years ago
I am also struggling with it. We get logs from third-party with several fields 
having values as NULL. They have structured it so, because these logs need to 
be SQL-compliant. But unfortunately bigquery does not parse NULL properly.

Having an option to specify valid NULL values as a part of load configuration 
(https://cloud.google.com/bigquery/docs/reference/v2/jobs#configuration.load) 
would be best thing to have.

Original comment by saumitra...@rocket-internet.de on 9 Jul 2015 at 10:21

GoogleCodeExporter commented 8 years ago
From Marketo source - \N represents Null big query doesn't seem to accept it. 
Any workaround?

Original comment by rajeshk...@gae.golgek.mobi on 14 Jul 2015 at 7:16

GoogleCodeExporter commented 8 years ago
Currently there are only two options:

1. Preprocess your data prior to ingestion to change \N to the empty string.
2. Load your data as a string, and then run a query over it to convert to a 
true null value.

Thanks for the suggestion--we'll look into adding this as a feature.

Original comment by jcon...@google.com on 14 Jul 2015 at 11:50

GoogleCodeExporter commented 8 years ago

Original comment by thomasp...@google.com on 25 Nov 2015 at 1:35