I'm trying to move a bunch of data that I have in a bucket (newline delimited json files) into BigQuery. BigQuery forbids certain characters in their field names, such as dashes -
or slashes
. Our data unfortunately has dashes in many of the field names, i.e.
jsonPayload.request.x-search
I tried renaming the field in the BigQuery schema to
jsonPayload.request.x_search
hoping that the loader would do some magic, but nope.
Aside from running a job to rename the fields in storage (really undesirable, especially because new files come in hourly), is there a way to map fields in the JSON files to fields in the BQ schema?
I've been using the console UI but it makes no difference to me what interface to use with BQ.