Database Reference
In-Depth Information
# Select the JSON input format.
load_config['sourceFormat'] = 'NEWLINE_DELIMITED_JSON'
The last line of the previous snippet configures the job to treat the input
as JSON. The following sample illustrates the newline-delimited format. To
emphasize the role of newlines, they are explicitly rendered as \n . Ignore
the actual line breaks because they are present only to improve legibility.
{
"string_f": "one",
"boolean_f": [true, false],
"record_f": {
"integer_f": 1,
"float_f": 1.1
},
"timestamp_f": "2013-09-18 13:21:03-07:00"
} \n
{
"string_f": null,
"boolean_f": []
} \n
{
"timestamp_f":1379897943.51
} \n
{
"boolean_f": ["true"],
"record_f": {
"integer_f":"3",
"float_f":"1"
}
}
The top-level record is represented as a JSON object with field names of
the object corresponding to the columns or top-level fields of the table.
Repeated fields are represented as JSON lists and nested records as nested
JSON objects. This mapping is natural and probably obvious. The first line
of input in the sample illustrates these features. Note that a JSON null
value is equivalent to the absence of the JSON field and is interpreted as a
NULL value for the corresponding field in the table. So in the second line of
Search WWH ::




Custom Search