如果表中的某些最近流式插入的行可能不可用于 DML 操作(DELETE、UPDATE、MERGE),则可能会出现 'UPDATE or DELETE statement over table <project.dataset.table> would
affect rows in the streaming buffer, which is not supported' 错误几分钟,但在极少数情况下错误持续的时间长达 90 分钟。如需了解详情,请参阅流式传输数据的可用性和 DML 限制。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-02-19。"],[[["\u003cp\u003eThis document provides a comprehensive guide to understanding and troubleshooting error messages encountered when using BigQuery, including HTTP error codes and specific error objects.\u003c/p\u003e\n"],["\u003cp\u003eBigQuery API responses may include \u003ccode\u003eerrors\u003c/code\u003e or \u003ccode\u003eerrorResults\u003c/code\u003e objects with \u003ccode\u003eErrorProto\u003c/code\u003e details, and the \u003ccode\u003ereason\u003c/code\u003e property within these objects corresponds to the "Error message" in the provided error table.\u003c/p\u003e\n"],["\u003cp\u003eHTTP response codes in the \u003ccode\u003e5xx\u003c/code\u003e range indicate server-side issues, suggesting users retry requests later and examine the response body for error details.\u003c/p\u003e\n"],["\u003cp\u003eAuthentication errors, detailed by OAuth2 specifications, can be reviewed using the logs explorer, with specific filters available for identifying policy denials, user authentication issues, and IAM policy changes.\u003c/p\u003e\n"],["\u003cp\u003eConnectivity errors encountered with client libraries or the API, often related to timeouts or broken pipes, generally suggest implementing retry mechanisms and adjusting timeout values.\u003c/p\u003e\n"]]],[],null,["# Error messages\n==============\n\nThis document describes error messages that you might encounter when working with\nBigQuery, including HTTP error codes and suggested troubleshooting\nsteps.\n\nFor more information about query errors, see\n[Troubleshoot query errors](/bigquery/docs/troubleshoot-queries).\n\nFor more information about streaming insert errors, see\n[Troubleshoot streaming inserts](/bigquery/docs/streaming-data-into-bigquery#troubleshooting).\n\nError table\n-----------\n\nResponses from the BigQuery API include an HTTP error code and an error object\nin the response body. An error object is typically one of the following:\n\n- An [`errors` object](/bigquery/docs/reference/rest/v2/Job#jobstatus), which contains an array of [`ErrorProto`\n objects](/bigquery/docs/reference/rest/v2/tables#errorproto).\n- An [`errorResults` object](/bigquery/docs/reference/rest/v2/Job#jobstatus), which contains a single [`ErrorProto`\n object](/bigquery/docs/reference/rest/v2/tables#errorproto).\n\nThe **Error message** column in the following table maps to the `reason` property\nin an `ErrorProto` object.\n\nThe table does not include all possible HTTP errors or other networking errors.\nTherefore, don't assume that an error object is present in every error response\nfrom BigQuery. In addition, you might receive different errors or\nerror objects if you use the Cloud Client Libraries for the BigQuery API. For\nmore information, see [BigQuery API Client\nLibraries](/bigquery/docs/reference/libraries).\n\nIf you receive an HTTP response code that doesn't appear in the following table,\nthe response code indicates an issue or an expected result with the HTTP\nrequest. Response codes in the `5xx` range indicate a server-side error. If you\nreceive a `5xx` response code, then retry the request later. In some cases, a\n`5xx` response code might be returned by an intermediate server such as a\nproxy. Examine the response body and response headers for details about the\nerror. For a full list of HTTP response codes, see [HTTP response\ncodes](https://en.wikipedia.org/wiki/HTTP_response_codes).\n\nIf you use the [bq command-line tool](/bigquery/bq-command-line-tool) to check job status,\nthe error object is not returned by default. To view the error object and the\ncorresponding `reason` property that maps to the following table, use the\n`--format=prettyjson` flag. For example, `bq --format=prettyjson show -j\n*\u003cjob id\u003e*`. To view verbose logging for the bq tool, use\n`--apilog=stdout`. To learn more about troubleshooting the bq tool,\nsee [Debugging](/bigquery/docs/bq-command-line-tool#debugging).\n\n### Sample error response\n\n GET https://bigquery.googleapis.com/bigquery/v2/projects/12345/datasets/foo\n Response:\n [404]\n {\n \"error\": {\n \"errors\": [\n {\n \"domain\": \"global\",\n \"reason\": \"notFound\",\n \"message\": \"Not Found: Dataset myproject:foo\"\n }],\n \"code\": 404,\n \"message\": \"Not Found: Dataset myproject:foo\"\n }\n }\n\n### Calculate rate of failing requests and uptime\n\nThe majority of 500 and 503 errors can be resolved by performing a retry with\nexponential backoff. In the case where 500 and 503 errors still persist, you\ncan calculate the overall rate of failing requests and corresponding uptime to\ncompare it to the [BigQuery Service Level Agreement\n(SLA)](/bigquery/sla) to determine if the service is working as expected.\n\nTo calculate the overall rate of failing requests during the last 30 days, take\nthe number of failed requests for a specific API call or method from the last\n30 days and divide by the total number of requests for that API call or method\nfrom the last 30 days. Multiply this value by 100 to get the average percentage\nof failed requests over 30 days.\n\nFor example, you can query [Cloud Logging\ndata](/logging/docs/view/logging-query-language) to get the number of total\n`jobs.insert` requests and the number of failed `jobs.insert` requests and\nperform the calculation. You can also obtain the error rate values from the\n[API dashboard](/apis/docs/monitoring#using_the_api_dashboard) or using the\nMetrics Explorer in [Cloud Monitoring](/apis/docs/monitoring#using). These\noptions won't include data about networking or routing problems encountered\nbetween the client and BigQuery, so we also recommend using a\nclient-side logging and reporting system for more precise failure rate\ncalculations.\n\nFirst, take 100% minus the overall rate of failing requests. If this value is\nmore than or equal to the value described in the BigQuery SLA,\nthen the uptime also meets the BigQuery SLA. However, if this\nvalue is less than the value described in the SLA, calculate the uptime\nmanually.\n\nIn order to calculate the uptime, you need to know the number of minutes that\nare considered service downtime. Service downtime means a period of one minute\nwith more than 10% error rate calculated according to SLA definitions. To\ncalculate the uptime, take the total minutes from the last 30 days and subtract\nthe total minutes that the service was down. Divide the remaining time by the\ntotal minutes from the last 30 days and multiply this value by 100 to get the\npercentage of uptime over 30 days. For more information about the definitions\nand calculations related to SLA , see [BigQuery Service Level\nAgreement (SLA)](/bigquery/sla)\n\nIf your monthly uptime percentage is greater than or equal to the value\ndescribed in the BigQuery SLA, then the error was most likely\ncaused by a transient issue, so you can continue to retry using [exponential\nbackoff](/monitoring/api/troubleshooting#exponential-retry).\n\nIf the uptime is below the value presented in the SLA, [contact\nsupport](/support) for help and share the observed overall error rate and\nuptime calculations.\n\nAuthentication errors\n---------------------\n\nErrors thrown by the OAuth token generation system return the following JSON\nobject, as defined by the [OAuth2\nspecification](https://tools.ietf.org/html/rfc6749#section-5.2).\n\n`{\"error\" : \"_description_string_\"}`\n\nThe error is accompanied by either an HTTP `400` Bad Request error or an HTTP\n`401` Unauthorized error. `_description_string_` is one of the error codes\ndefined by the OAuth2 specification. For example:\n\n`{\"error\":\"invalid_client\"}`\n\n### Review errors\n\nYou can use the [logs explorer](/logging/docs/view/logs-explorer-interface) to\nview authentication errors for specific jobs, users, or other scopes. The\nfollowing are examples of logs explorer filters that you can use to review\nauthentication errors:\n\n- Search for failed jobs with permission issues in the Policy Denied audit\n logs:\n\n resource.type=\"bigquery_resource\"\n protoPayload.status.message=~\"Access Denied\"\n logName=\"projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/logs/cloudaudit.googleapis.com%2Fdata_access\"\n\n Replace \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e with the ID of the project\n containing the resource.\n- Search for a specific user or service account used for authentication:\n\n resource.type=\"bigquery_resource\"\n protoPayload.authenticationInfo.principalEmail=\"\u003cvar translate=\"no\"\u003eEMAIL\u003c/var\u003e\"\n\n Replace \u003cvar translate=\"no\"\u003eEMAIL\u003c/var\u003e with the email address of the user or\n service account.\n- Search for Identity and Access Management policy changes in the Admin Activity audit\n logs:\n\n protoPayload.methodName=~\"SetIamPolicy\"\n logName=\"projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/logs/cloudaudit.googleapis.com%2Factivity\"\n\n- Search for changes to a specific BigQuery dataset in the\n Data Access audit logs:\n\n resource.type=\"bigquery_resource\"\n protoPayload.resourceName=\"projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/datasets/\u003cvar translate=\"no\"\u003eDATASET_ID\u003c/var\u003e\"\n logName=projects/\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003ePROJECT_ID\u003c/span\u003e\u003c/var\u003e/logs/cloudaudit.googleapis.com%2Fdata_access\n\n Replace \u003cvar translate=\"no\"\u003eDATASET_ID\u003c/var\u003e with the ID of the dataset containing the resource.\n\nConnectivity error messages\n---------------------------\n\nThe following table lists error messages that you might see because of\nintermittent connectivity issues when using the client libraries or calling the\nBigQuery API from your code:\n\nGoogle Cloud console error messages\n-----------------------------------\n\nThe following table lists error messages that you might see while you work in the\nGoogle Cloud console."]]