sijocherian / google-bigquery

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

Export to GCS in CSV format renders datetime field as empty #255

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello BQ Team,

I am using the bigquery UI to export tables to GCS in CSV format. However, for 
some tables the datetime fields are empty when exported.
Below are some of the positive/negative samples I have.

Jobs with export that is able to render datetime fields:
clean-phoenix-86807:job_106EUIIMh7FFBx9GRVpX0AIrpsA

Jobs with export that renders datetime fields empty:
clean-phoenix-86807:job_13T0JzfiWiPAzmqu110magtYq8A
clean-phoenix-86807:job_zOWF5tqfMTbjcWii1TTuQDOh3Rc

Thanks,
Ryan

Original issue reported on code.google.com by r...@audiencepi.com on 2 Jun 2015 at 11:29

GoogleCodeExporter commented 9 years ago
We did more tests and found that CSV is not exporting the table correctly. 
Instead of 15 rows (which is shown in JSON export), we ended with 2 rows in CSV 
export.

CSV Export:
clean-phoenix-86807:job_nKLMb0EZ-DWNcNeFHY5b85B7LW4

JSON Export:
clean-phoenix-86807:job_2k4xRyXpMtG7jjET4qffiN12uo4

Original comment by r...@audiencepi.com on 2 Jun 2015 at 11:59

GoogleCodeExporter commented 9 years ago
One more note, for the JSON export, even though datetime fields are not empty, 
all the fields are being rendered as "1970-01-01 00:00:00 UTC"

Original comment by r...@audiencepi.com on 3 Jun 2015 at 12:12

GoogleCodeExporter commented 9 years ago
Problem reproduced and acknowledged, working on a fix.

Original comment by mos...@google.com on 3 Jun 2015 at 11:41

GoogleCodeExporter commented 9 years ago
Also, if you need a short-term workaround, you can rewrite your table to make 
it exportable by copying the table via a SELECT * query.

Specifically, if your table is [dataset.table], you can run an 
allowLargeResults query that looks like this:

  SELECT * FROM [dataset.table]

The output table will now be exportable.

Caveats:
- This won't work with tables that have nested or repeated fields, because 
allowLargeResults will flatten them (and this query won't work if you disable 
flattening).
- This query will charge you for scanning the full table.

If either of those present a problem, please let us know, and we'll see what 
else we can do to help. Hopefully we'll have the root cause fixed soon.

Original comment by jcon...@google.com on 3 Jun 2015 at 11:48

GoogleCodeExporter commented 9 years ago
This problem should be fully fixed now.

Original comment by mos...@google.com on 11 Jun 2015 at 8:56