2

When getting table content in CSV, null columns get dropped in output. Example:

curl -X GET -H "Authorization: Bearer TOKEN" “https://www.googleapis.com/bigquery/v2/projects/PROJ_NAME/datasets/DATASET_NAME/tables/TESTNULL/data?alt=csv&startIndex=0&maxResults=10000

the output is:

1,2,3

2,3,4

3,5

5

5,6

TESTNULL table contains 3 integer columns:

Row f1 f2 f3
1 1 2 3
2 2 3 4
3 3 null 5
4 null null 5
5 5 6 null

The same query with alt=json works fine. Ideas? Thanks.

3
  • Just a question, maybe I'm dense... but how did you get the alt param for the request? I see it nowhere in the docs about the Rest API
    – Patrice
    Jun 29, 2015 at 20:01
  • I've never seen a rest api either. if you google "bigquery get data in csv" or something similar, some posts will mention the alt=... parameter
    – Bing Zheng
    Jun 30, 2015 at 0:27
  • my point is that the official BQ doc (cloud.google.com/bigquery/docs/reference/v2/tables/list), there's nothing about that parameter, so I'm just trying to find something that explains the behavior
    – Patrice
    Jun 30, 2015 at 13:24

1 Answer 1

1

This is a bug in the alt=csv output for table data list. The root cause has been identified and we are now tracking this issue in our internal bug tracker.

Thank you for the report!

1
  • Any ideas on when this will be fixed? Some ppl in my organization is working with the BQ team and can file tickets. Should they do so? Thanks.
    – Bing Zheng
    Jul 8, 2015 at 0:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.