I am getting below error while uploading a CSV to Big Query via apps script.
Error - "API call to bigquery.jobs.insert failed with error: Empty response"
Added some part of my code below for reference.
// Create the data upload job.
const job = {
configuration: {
load: {
// Overwite the table.
writeDisposition:'WRITE_TRUNCATE',
schema: {
fields: schema
},
destinationTable: {
projectId: projectId,
datasetId: datasetId,
tableId: tableId
},
source_format: 'CSV',
autodetect: false,
}
}
};
var bqJob = BigQuery.Jobs.insert(job, projectId, data);
The error message is not so descriptive to figure out the root cause. Can anyone please advise on this?
Also filed an issue for this in Apps Script issue tracker https://issuetracker.google.com/issues/247052933
Request you to kindly reopen this question. This error message has not been discussed in any of the other questions yet. Hence, it is not a duplicate. It is not associated with Program Google Apps Script to throw error when BigQuery "Resources exceeded during query execution" The error messages are different.