How to save integer data types when exporting to JSON?

When I export bigquery tables in JSON format, the fields are INTEGERconverted to rows. Is there a way to save integer data types when exporting?

The following are the minimum steps to play an integer transform:

  • Run the query SELECT INTEGER(1) AS myIntand save the result in a table. Note that the schema of the output table shows the type as INTEGER.
  • Export the table in JSON format. The output will be:{"myInt":"1"}

In JSON format, "1" there is a string , not an integer.

+4
source share
1 answer

; Javascript, IEEE, JSON BigQuery.

Javascript IEEE754. Javascript JSON javascript. BigQuery 64- .

- , 64- IEEE 754. ( , : IEEE 754 64 , , , 64- , ).

, BigQuery JSON Javascript, , .

... API , API javascript. , , . (, , ).

BigQuery , ? ( , ).

+2

Source: https://habr.com/ru/post/1606455/


All Articles