【发布时间】:2018-08-13 22:03:06
【问题描述】:
我正在使用 Google 表格上的 Google 应用脚本来将我的表格加载到 BigQuery 到我将创建的新表格中。
当我尝试创建表时,出现解析错误。
这是我的代码:
function CreateTable() {
var projectId = 'project-id-';
var datasetId = 'testing';
// Here is where I try to create the bqTable
var tableId = 'test2';
var table = {
tableReference: {
projectId: projectId,
datasetId: datasetId,
tableId: tableId,
},
schema: {
fields: [
{name: 'Id', type: 'STRING'},
],
},
};
table = BigQuery.Tables.insert(tableId, projectId, datasetId);
}
我该如何解决这个问题?
【问题讨论】:
-
查看你的 projectId -
var projectId = 'project-id-';和额外的逗号 -
是的,就是这样!在我得到这个基本示例之前,我没有注意到,我是我们的股票
-
我可以将其作为答案发布,以便您接受
标签: google-apps-script google-bigquery