Google Apps脚本中的最大属性大小是多少? [英] What is the maximum properties size in Google Apps Script?

查看:47
本文介绍了Google Apps脚本中的最大属性大小是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Google Apps脚本中存储大量键/值对,但一段时间后失败.我正在使用这个:

I am trying to store large number of key/value pairs in Google Apps script and it fails after a while. I am using this:

var properties = PropertiesService.getScriptProperties();
properties.setProperties(newProperties, false);

它可以正常工作到大约10,000,然后得到这个:

It works fine until around 10,000 and then it gets this:

例外:提供的参数过多.预期:属性.在warmCache(GroupCache:133)的getGroups(GroupCache:77)处

这是最大尺寸吗?如果是这样,是否有办法解决?我无法使用CacheService,因为无法获取所有值(只能通过键进行检索).

Is this the maximum size? If so, is there a way around this? I cannot use CacheService because there is no way to get all the values out (only retrieval is by key).

感谢您的帮助.

推荐答案

页面 Google服务配额规定了以下限制:

  • 属性值大小:每个值9kB
  • 物业总存储空间:每个物业商店500kB

此外,每天的读/写操作数量是有限制的:消费者帐户为50,000,G Suite Basic/Business/Edu/Gov为500,000.

Additionally, there is a limit on the number of read/write operations per day: 50,000 for consumer accounts and 500,000 for G Suite Basic/Business/Edu/Gov.

一种可能的解决方法是使用电子表格存储数据.一个电子表格最多可以包含2,000,000个单元格.一个单元格最多可容纳50,000个字符的字符串.

A possible workaround is to use a spreadsheet to store data in. A spreadsheet can have up to 2,000,000 cells. A cell can hold a string up to 50,000 characters.

这篇关于Google Apps脚本中的最大属性大小是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆