fippo / rtcstats-server

Server for https://github.com/fippo/rtcstats
MIT License
38 stars 44 forks source link

BigQuery ignore unknown values #326

Closed milen-yordanov closed 4 years ago

milen-yordanov commented 4 years ago

Running the server with BigQuery storage causes errors like: No such field: audioGoogResidualEchoLikelihoodRecentMaxMean

I suppose the workaround for this case is to use config.fields and to specify ALL columns in the table.

Wouldn't it be better to modify

bigquery
  .dataset(config.dataset)
  .table(config.table)
  .load(filename, { format: 'JSON'})

to

bigquery
  .dataset(config.dataset)
  .table(config.table)
  .load(filename, { format: 'JSON', ignoreUnknownValues: true })
fippo commented 4 years ago

That sounds like a better solution indeed, thank you! @juandebravo can you give the PR a spin?