title: Importing data from firebase to bigquery
body: <p>I'm trying to import data from firebase to big query upon <code>onWrite</code> event and getting same error each time function is triggered given below.</p>
  
  <blockquote>
    <p>PartialFailureError: A failure occurred during this request.
        at /user_code/node_modules/@google-cloud/bigquery/src/table.js:1086:13
        at Object.handleResp (/user_code/node_modules/@google-cloud/bigquery/node_modules/@google-cloud/common/src/util.js:134:3)
        at /user_code/node_modules/@google-cloud/bigquery/node_modules/@google-cloud/common/src/util.js:465:12
        at Request.onResponse [as _callback] (/user_code/node_modules/@google-cloud/bigquery/node_modules/retry-request/index.js:120:7)
        at Request.self.callback (/user_code/node_modules/@google-cloud/bigquery/node_modules/request/request.js:188:22)
        at emitTwo (events.js:106:13)
        at Request.emit (events.js:191:7)
        at Request. (/user_code/node_modules/@google-cloud/bigquery/node_modules/request/request.js:1171:10)
        at emitOne (events.js:96:13)
        at Request.emit (events.js:188:7)</p>
  </blockquote>
  
  <p>my function code is </p>
  
  <pre><code>exports.addtobigquery = functions.database.ref('/mn_users').onWrite(event =&gt; 
  {
    const dataset = bigquery.dataset(functions.config().bigquery.datasetname);
    const table = dataset.table(functions.config().bigquery.tablename);
  
    return table.insert({
      id: event.data.key,
      name: event.data.val().name,
      email: event.data.val().email
    });
  
  });
  </code></pre>
  
  <p>I want to figure out what I'm doing wrong?</p>