یک مجموعه داده را به روز کنید
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
اطلاعات مربوط به یک مجموعه داده را با ارسال یک درخواست HTTP PATCH
به نقطه پایانی مجموعه داده پچ که شامل شناسه مجموعه داده نیز می شود، به روز کنید:
https://mapsplatformdatasets.googleapis.com/v1/projects/PROJECT_NUMBER_OR_ID/datasets/DATASET_ID
می توانید یکی یا هر دو ویژگی displayName
و description
مجموعه داده را به روز کنید.
به عنوان مثال:
curl -X PATCH -d '{
"displayName": "My Updated Dataset",
"description": "This is an updated description"
}' \
-H 'X-Goog-User-Project: PROJECT_NUMBER_OR_ID' \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
"https://mapsplatformdatasets.googleapis.com/v1/projects/PROJECT_NUMBER_OR_ID/datasets/f57074a0-a8b6-403e-9df1-e8a9e4f9fc46"
درخواست اطلاعات مربوط به مجموعه داده به روز شده را برمی گرداند:
{
"name": "projects/PROJECT_NUMBER_OR_ID/datasets/f57074a0-a8b6-403e-9df1-e8a9e4f9fc46",
"displayName": "My Updated Dataset",
"description": "This is an updated description",
"versionId": "5fb3b84e-1405-4ecd-8f81-9183631f1c07",
"usage": [
"USAGE_DATA_DRIVEN_STYLING"
],
"gcsSource": {
"inputUri": "gs://mybucket/my.csv",
"fileFormat": "FILE_FORMAT_CSV"
},
"createTime": "2023-03-24T14:47:37.308977Z",
"updateTime": "2023-03-28T15:17:17.919351Z",
"versionCreateTime": "2023-03-24T14:48:05.053114Z",
"status": {
"state": "STATE_COMPLETED"
}
}
یک ماسک میدانی را مشخص کنید
بهطور پیشفرض، بهروزرسانی تمام فیلدهای پشتیبانیشده مشخصشده در متن درخواست را تغییر میدهد، یعنی هم displayName
و هم description
. با این حال، شما همچنین می توانید پارامتر query updateMask
را در درخواست اضافه کنید تا به طور صریح فیلدهایی را در بدنه درخواست برای به روز رسانی مشخص کنید.
از updateMask
برای تعیین یک لیست جدا شده با کاما از نام های کاملا واجد شرایط فیلدها برای به روز رسانی استفاده کنید. به عنوان مثال، برای به روز رسانی فقط قسمت displayName
:
curl -X PATCH -d '{
"displayName": "My Updated Dataset",
"description": "This is an updated description"
}' \
-H 'X-Goog-User-Project: PROJECT_NUMBER_OR_ID' \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
"https://mapsplatformdatasets.googleapis.com/v1/projects/PROJECT_NUMBER_OR_ID/datasets/f57074a0-a8b6-403e-9df1-e8a9e4f9fc46?updateMask=displayName"
مقدار پیش فرض پارامتر query updateMask
*
است به این معنی که تمام فیلدهای پشتیبانی شده مشخص شده در بدنه درخواست را به روز کنید.
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-08-29 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-08-29 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eUpdate dataset metadata, such as \u003ccode\u003edisplayName\u003c/code\u003e and \u003ccode\u003edescription\u003c/code\u003e, using an HTTP \u003ccode\u003ePATCH\u003c/code\u003e request to the specified endpoint with the dataset ID.\u003c/p\u003e\n"],["\u003cp\u003eTo update the actual data within the dataset, a separate procedure outlined in the "Upload new data to the dataset" documentation should be followed.\u003c/p\u003e\n"],["\u003cp\u003eBy default, a \u003ccode\u003ePATCH\u003c/code\u003e request updates all provided fields (\u003ccode\u003edisplayName\u003c/code\u003e, \u003ccode\u003edescription\u003c/code\u003e), but you can selectively update fields using the \u003ccode\u003eupdateMask\u003c/code\u003e query parameter.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eupdateMask\u003c/code\u003e parameter accepts a comma-separated list of field names, allowing for granular control over which dataset attributes are modified.\u003c/p\u003e\n"]]],["To update dataset information, send a `PATCH` request to the specified endpoint, including the dataset ID. Modify the `displayName` and/or `description` properties in the request body. To control which fields are updated, utilize the `updateMask` query parameter with a comma-separated list of field names. Without `updateMask`, both fields are updated if present. The request returns details of the modified dataset. Note that updating data within the dataset uses a separate process.\n"],null,["# Update a dataset\n\nUpdate information about a dataset by sending an HTTP `PATCH` request to the\n[patch dataset](/maps/documentation/datasets/reference/rest/v1/projects.datasets/patch) endpoint that\nalso includes the ID of the dataset: \n\n```html\nhttps://mapsplatformdatasets.googleapis.com/v1/projects/PROJECT_NUMBER_OR_ID/datasets/DATASET_ID\n```\n\nYou can update either or both of the `displayName` and `description` properties\nof the dataset.\n| **Note:** To update the data for the dataset, use the procedure described in [Upload new data to the dataset](/maps/documentation/datasets/create#new-version).\n\nFor example: \n\n```\ncurl -X PATCH -d '{\n \"displayName\": \"My Updated Dataset\",\n \"description\": \"This is an updated description\"\n }' \\\n -H 'X-Goog-User-Project: PROJECT_NUMBER_OR_ID' \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $TOKEN\" \\\n \"https://mapsplatformdatasets.googleapis.com/v1/projects/PROJECT_NUMBER_OR_ID/datasets/f57074a0-a8b6-403e-9df1-e8a9e4f9fc46\"\n```\n\nThe request returns information about the updated dataset: \n\n```\n{\n \"name\": \"projects/PROJECT_NUMBER_OR_ID/datasets/f57074a0-a8b6-403e-9df1-e8a9e4f9fc46\",\n \"displayName\": \"My Updated Dataset\",\n \"description\": \"This is an updated description\",\n \"versionId\": \"5fb3b84e-1405-4ecd-8f81-9183631f1c07\",\n \"usage\": [\n \"USAGE_DATA_DRIVEN_STYLING\"\n ],\n \"gcsSource\": {\n \"inputUri\": \"gs://mybucket/my.csv\",\n \"fileFormat\": \"FILE_FORMAT_CSV\"\n },\n \"createTime\": \"2023-03-24T14:47:37.308977Z\",\n \"updateTime\": \"2023-03-28T15:17:17.919351Z\",\n \"versionCreateTime\": \"2023-03-24T14:48:05.053114Z\",\n \"status\": {\n \"state\": \"STATE_COMPLETED\"\n }\n}\n```\n\nSpecify a field mask\n--------------------\n\nBy default, the update modifies all the supported fields specified in the body\nof the request, meaning both `displayName` and `description`. However, you can\nalso include the\n[`updateMask`](/maps/documentation/datasets/reference/rest/v1/projects.datasets/patch#query-parameters)\nquery parameter in the request to explicitly specify the fields in the\nrequest body to update.\n\nUse `updateMask` to specify a comma-separated list of fully qualified names of\nfields to update. For example, to update only the `displayName` field: \n\n```\ncurl -X PATCH -d '{\n \"displayName\": \"My Updated Dataset\",\n \"description\": \"This is an updated description\"\n }' \\\n -H 'X-Goog-User-Project: PROJECT_NUMBER_OR_ID' \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $TOKEN\" \\\n \"https://mapsplatformdatasets.googleapis.com/v1/projects/PROJECT_NUMBER_OR_ID/datasets/f57074a0-a8b6-403e-9df1-e8a9e4f9fc46?updateMask=displayName\"\n```\n\nThe default value of the `updateMask` query parameter is `*` meaning\nupdate all supported fields specified in the request body."]]