You are loading data without specifying data format, data will be treated as CSV format by default

Viewed 141

Im trying to load data by BigQuery.job to BQ table.I have array with objects.Object is built in that way

let word = 
{
fullWord: string,
generationType: string
}

So then i transform this array in to newBlob();

And using this data,and job which is already configurated im trying to run this job;

var data = Utilities.newBlob(generatedWordsArray.toString(), "application/octet-stream");
job = BigQuery.Jobs.insert(job, projectID, data);

Script works,no errors.But table continue be empty.In the project history i found job info,and found error:

You are loading data without specifying data format, data will be treated as CSV format by default. 
If this is not what you mean, please specify data format by --source_format.

I am confused,because I specified format while creating a blob("application/octet-stream"). What should i do,or where i have a mistake?

0 Answers
Related