데이터 세트 업데이트
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
데이터 세트의 ID도 포함하는 patch dataset 엔드포인트에 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
모두)를 수정합니다. 하지만 요청에 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"
updateMask
쿼리 매개변수의 기본값은 *
입니다. 즉, 요청 본문에 지정된 지원되는 모든 필드를 업데이트합니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-31(UTC)
[null,null,["최종 업데이트: 2025-08-31(UTC)"],[[["\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."]]