Update a dataset
Stay organized with collections
Save and categorize content based on your preferences.
Update information about a dataset by sending an HTTP PATCH
request to the
patch dataset endpoint that
also includes the ID of the dataset:
https://mapsplatformdatasets.googleapis.com/v1/projects/PROJECT_NUMBER_OR_ID/datasets/DATASET_ID
You can update either or both of the displayName
and description
properties
of the dataset.
For example:
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"
The request returns information about the updated dataset:
{
"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"
}
}
Specify a field mask
By default, the update modifies all the supported fields specified in the body
of the request, meaning both displayName
and description
. However, you can
also include the
updateMask
query parameter in the request to explicitly specify the fields in the
request body to update.
Use updateMask
to specify a comma-separated list of fully qualified names of
fields to update. For example, to update only the displayName
field:
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"
The default value of the updateMask
query parameter is *
meaning
update all supported fields specified in the request body.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-28 UTC.
[null,null,["Last updated 2025-08-28 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."]]