0

I have some data in a google spreadsheet that I would like to load into the BigQuery table, I have tried but with my code I can only fill the spreadsheet (which I didn't want), my BigQuery table is created but it is still empty .

I found how to load data from a CSV file to BigQuery: https://developers.google.com/apps-script/advanced/bigquery

  // Upload CSV data from Drive and convert it to the correct format for upload.
  const file = DriveApp.getFileById(csvFileId);
  const data = file.getBlob().setContentType('application/octet-stream');

Instead of DriveApp, I use methods of the spreadsheet class, but I haven't been able to get it to populate my tables in Big Query from my spreadsheet.

TheMaster
  • 45,448
  • 6
  • 62
  • 85
  • why not use the external table on bigquery functionality instead of appsscripts? https://cloud.google.com/bigquery/docs/external-data-drive#console – Logan Oct 05 '22 at 07:21

0 Answers0