Infeasible
Status Update
Comments
hu...@gmail.com <hu...@gmail.com> #2
Correct me if I am wrong but is the reason you are setting it as a string is so as to not lose precision? If that is the case do you have any idea how I can ingest this JSON and identify which records are numbers and which arent?
my...@google.com <my...@google.com> #3
The reason is that most JSON parsers support only 32-bit integers, while BQ integers have 64 bits. You can use the field types in the result to determine how to parse the JSON, or if you want the JSON to use numbers rather than strings, you can cast the columns in a query to FLOAT (legacy SQL) or FLOAT64 (standard SQL). Note that this option may lose precision, however.
Alternatively, you can use Avro format which supports 64-bit integers.
Alternatively, you can use Avro format which supports 64-bit integers.
Description
1. Exporting any table to JSON produces an incorrect JSON format
2. Even Previewing a table in JSON format allows you to see this
What is the expected output? What do you see instead?
If I have a table with one column "foo" that has a type of "INTEGER" I expect the output in JSON to be {"foo":1234} instead the current output is {"foo":"1234"}. JSON parsers currently see this as a value of String instead of a number
What version of the product are you using? On what operating system?
Any
Please provide any additional information below.
Ideally I would like to see the json exported correctly, the alternative is doing a cleaning on each an every field on the json which isnt really a "clean" way of doing this
Thoughts?