Background:
I have messages published to a Pub/Sub topic, and I'm trying to stream them into BigQuery using Dataflow, with the "Cloud Pub/Sub Topic to BigQuery" template. (Read more about streaming templates.)
Issue:
Some field names in Pub/Sub messages contain dash's (-), of which I have no control, and the Dataflow template seems to be expecting exact same field names in the destination BigQuery table. One limitation with BQ is that dash's (-) aren't allowed in field names, although underscores are allowed. Therefore I'm getting errors like this although I have a params.gsm_level column in BQ:
{
"errors" : [ {
"debugInfo" : "",
"location" : "params.gsm-level",
"message" : "no such field.",
"reason" : "invalid"
} ],
"index" : 0
}
Question:
Is there anything I can do to map gsm-level in the message to gsm_level in BQ, but still using DF template without writing my own job? Thanks!