[[["易于理解","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-08-27。"],[],[],null,["# Troubleshooting\n\nAccess\n------\n\n### Could not add `Timeseries Insights DataSet Owner` to the service account\n\nThe \"Timeseries Insights DataSet Owner\" role might not be shown in the UI.\nYou can use the role ID `roles/timeseriesinsights.datasetsOwner` with the\ngcloud command to grant the necessary access. \n\n gcloud projects add-iam-policy-binding \"${PROJECT_ID}\" \\\n --member=\"serviceAccount:${SVC_ACCOUNT}\" \\\n --role=roles/timeseriesinsights.datasetsOwner \\\n --condition=None\n\nAnomaly Detection\n-----------------\n\nThis section lays out some common debugging steps to understand the\nTimeseries Insights API responses if they are different from your expectations.\n\n### Empty slices\n\nWhen executing a Timeseries Insights [query](/timeseries-insights/docs/reference/rest/v1/projects.locations.datasets/query)\non a loaded dataset, you might receive an empty\n[response](/timeseries-insights/docs/reference/rest/v1/projects.locations.datasets/query#response-body). \n\n```\nExample empty response,\n{'name': 'projects/demo-project/datasets/demo-dataset',\n'slices': []}\n```\n\nEmpty `slices` indicate that there are no data points in the requested time\nintervals `[detectionTime - TimeseriesParams.forecastHistory, detectionTime + TimeseriesParams.granularity]`.\n\nYou can alternatively try to query for an explicit slice that you expect to\nbe present in the dataset by using the\n[evaluateSlice](/timeseries-insights/docs/reference/rest/v1/projects.locations.datasets/evaluateSlice)\nAPI. This forces the system to return the time series for the given slice\nand its evaluation status.\n\n### ForecastResult.label INSUFFICIENT_DATA\n\nWhen executing a Timeseries Insights API\n[query](/timeseries-insights/docs/reference/rest/v1/projects.locations.datasets/query)\nor\n[evaluateSlice](/timeseries-insights/docs/reference/rest/v1/projects.locations.datasets/evaluateSlice),\nyou might observe `INSUFFICIENT_DATA` as the per slice [ForecastResultLabel](/timeseries-insights/docs/reference/rest/v1/ForecastResult#forecastresultlabel).\nThis means that we don't have enough data to classify the particular slices.\n\n#### status code: 3. message: Got density = xx. Min density = yy\n\nIn the following code example, the user asked Timeseries Insights API to make the\nclassification if 90% of the data points is present in the requested time\nintervals `[detectionTime - TimeseriesParams.forecastHistory, detectionTime]`.\nTimeseries Insights API can't provide a classification, because only 1% of the\ndata points is non-empty in the time series interval. \n\n```\n\"status\": {\n \"code\": 3,\n \"message\": \"Got density = 1. Min density = 90\"\n}\n```\n\nTry to experiment with the following parameters in the request to understand why\nthe data points might not exist.\n\n- detectionTime and TimeseriesParams\n\n - Make sure that `[detectionTime - TimeseriesParams.forecastHistory, detectionTime + TimeseriesParams.granularity]`\n is a subrange of all the events available in your dataset so that there is enough history for\n Timeseries Insights API to work with.\n This might require\n you to choose a `detectionTime` that is close to the end of the time series.\n\n - Timeseries Insights API builds a time series by going back in time from the\n `detectionTime`. How much we go back in time and how many points are included\n in the time series are determined by TimeseriesParams.forecastHistory and\n TimeseriesParams.granularity,\n\n - Start with a `minDensity = 0.0` if uncertain about the actual\n density of the events in the dataset. Fine tune the parameter for better\n precision later.\n\nAlso, see [Timeseries concepts](/timeseries-insights/docs/concept#time_series)\nfor parameter definitions."]]