Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-apps-script/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google apps script 通过谷歌应用程序脚本插入融合表_Google Apps Script_Google Fusion Tables - Fatal编程技术网

Google apps script 通过谷歌应用程序脚本插入融合表

Google apps script 通过谷歌应用程序脚本插入融合表,google-apps-script,google-fusion-tables,Google Apps Script,Google Fusion Tables,每当我尝试使用非sql方法将行“插入”到fusion表中时,都会出现以下错误:“很抱歉,发生了服务器错误。请稍等,然后重试。”我已通过身份验证,可以使用sql insert语句进行插入,但这对插入长度有较低的限制,因此我尝试使用其他方法 function temp () { var tableId = "<table id>"; var blob = Utilities.newBlob(['hi', 'how', 'are you'].join(','), {t

每当我尝试使用非sql方法将行“插入”到fusion表中时,都会出现以下错误:“很抱歉,发生了服务器错误。请稍等,然后重试。”我已通过身份验证,可以使用sql insert语句进行插入,但这对插入长度有较低的限制,因此我尝试使用其他方法

function temp () {
  var tableId = "<table id>";
  var blob = Utilities.newBlob(['hi', 'how', 'are you'].join(','), 
      {type: "octet/stream"});
  ret = FusionTables.Table.importRows(tableId, blob);
  Logger.log([ret,"for id"])
}
函数温度(){
var tableId=“”;
var blob=Utilities.newBlob(['hi','how','you'])。join(','),
{类型:“八位字节/流”});
ret=熔断片.Table.importRows(tableId,blob);
Logger.log([ret,“for id”])
}

对于创建blob时遇到此问题的其他人,需要一个
字节[]
字符串。工作职能将是:

function temp () {
  var tableId = "<table id>";
  var blob = Utilities.newBlob(['hi', 'how', 'are you'].join(','), 
      'application/octet-stream');
  ret = FusionTables.Table.importRows(tableId, blob);
  Logger.log([ret,"for id"])
}
函数温度(){
var tableId=“”;
var blob=Utilities.newBlob(['hi','how','you'])。join(','),
“应用程序/八位字节流”);
ret=熔断片.Table.importRows(tableId,blob);
Logger.log([ret,“for id”])
}
有关将FusionTables与包含许多有用帮助程序脚本的Google Apps脚本一起使用的教程,请参阅