Google大查询API返回“为此项目扫描的太多免费查询字节" [英] Google big query API returns "too many free query bytes scanned for this project"

查看:60
本文介绍了Google大查询API返回“为此项目扫描的太多免费查询字节"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Google的大型查询API从其n-gram数据集中检索结果.因此,我发送了多个查询从trigram_dataset中选择ngram,其中ngram =='自然语言处理'".

I am using Google's big query API to retrieve results from their n-gram dataset. So I send multiple queries of "SELECT ngram from trigram_dataset where ngram == 'natural language processing'".

我基本上使用的是此处发布的相同代码( https://developers.google.com/bigquery/bigquery-api-quickstart )替换为我的查询语句.

I'm basically using the same code posted here (https://developers.google.com/bigquery/bigquery-api-quickstart) replaced with my query statement.

在运行的每个程序上,我必须获取新的授权代码,然后在控制台中键入该代码,以授权我的程序在我的项目ID下向Google大查询发送查询.但是,在发送5个查询后,它仅返回" message:"超出配额:为此项目扫描了太多的免费查询字节.

On every program run, I have to get a new code of authorization and type it in the console, which gives authorization to my program to send queries to google big query under my project ID. However, after sending 5 queries, it just returns " "message" : "Exceeded quota: too many free query bytes scanned for this project".

根据Google Big Query的政策,他们的免费配额为每月100G,我认为我什至没有接近他们的配额.有人在上一个线程中建议,我应该启用帐单信息以使用其免费配额,但我仍然这样做,但仍然给我同样的错误.有什么方法可以检查剩余配额或如何解决此问题?非常感谢你!

According to Google Big Query policy, their free quota is 100G/month, and I don't think I've even nearly come close to their quota. Someone suggested in the previous thread that I should enable billing information to use their free quota, which I did, but it's still giving me the same error. Is there any way to check the leftover quota or how to resolve this problem? Thank you very much!

推荐答案

您提到的查询扫描了1.12 GB的数据,因此您应该能够在一个月内运行89次.

The query you've mentioned scans 1.12 GB of data, so you should be able to run it 89 times in a month.

配额的工作方式是从100 GB的每月配额开始-如果用完了,您不必等待一个月,但每天可以获得3.3个配额.

The way the quota works is that you start out with 100 GB of monthly quota -- if you use it up, you don't have to wait an entire month, but you get 3.3 more quota every day.

我的猜测(请确认)是您运行了一堆查询并用完了每月100 GB的免费配额,然后等待了一天,并且在达到配额上限之前只能运行一些查询.如果不是这种情况,请告诉我,并提供您的项目ID,我可以在日志中查看.

My guess (please confirm) is that you ran a bunch of queries and used up your 100 GB monthly free quota, then waited a day, and only were able to run a few queries before hitting the quota cap. If this is not the case, please let me know, and provide your project id and I can take a look in the logs.

此外,请注意,这不是bigquery的最有效用法;一个选项是将多个请求一起批处理.在这种情况下,您可以执行以下操作:

Also, note that this isn't the most efficient usage of bigquery; an option would be to batch together multiple requests. In this case you could do something like:

SELECT ngram 
FROM trigram_dataset 
WHERE ngram IN (
  'natural language processing',
  'some other trigram',
  'three more words')

这篇关于Google大查询API返回“为此项目扫描的太多免费查询字节"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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