If successful, the response body contains an instance of Operation.
ExportDataConfig
Describes what part of the Dataset is to be exported, the destination of the export and how to export.
Fields
annotationsFilter
string
An expression for filtering what part of the Dataset is to be exported. Only Annotations that match this filter will be exported. The filter syntax is the same as in ListAnnotations.
savedQueryId
string
The id of a SavedQuery (annotation set) under the Dataset specified by ExportDataRequest.name used for filtering Annotations for training.
Only used for custom training data export use cases. Only applicable to Datasets that have SavedQueries.
Only Annotations that are associated with this SavedQuery are used in respectively training. When used in conjunction with annotationsFilter, the Annotations used for training are filtered by both savedQueryId and annotationsFilter.
Only one of savedQueryId and annotationSchemaUri should be specified as both of them represent the same thing: problem type.
annotationSchemaUri
string
The Cloud Storage URI that points to a YAML file describing the annotation schema. The schema is defined as an OpenAPI 3.0.2 Schema Object. The schema files that can be used here are found in gs://google-cloud-aiplatform/schema/dataset/annotation/, note that the chosen schema must be consistent with metadata of the Dataset specified by ExportDataRequest.name.
Only used for custom training data export use cases. Only applicable to Datasets that have DataItems and Annotations.
Only Annotations that both match this schema and belong to DataItems not ignored by the split method are used in respectively training, validation or test role, depending on the role of the DataItem they are on.
The Google Cloud Storage location where the output is to be written to. In the given directory a new directory will be created with name: export-data-<dataset-display-name>-<timestamp-of-export-call> where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export output will be written into that directory. Inside that directory, annotations with the same schema will be grouped into sub directories which are named with the corresponding annotations' schema title. Inside these sub directories, a schema.yaml will be created to describe the output format.
split
Union type
The instructions how the export data should be split between the training, validation and test sets. split can be only one of the following:
{"annotationsFilter": string,"savedQueryId": string,"annotationSchemaUri": string,"exportUse": enum (ExportUse),// destination"gcsDestination": {object (GcsDestination)}// Union type// split"fractionSplit": {object (ExportFractionSplit)},"filterSplit": {object (ExportFilterSplit)}// Union type}
ExportFractionSplit
Assigns the input data to training, validation, and test sets as per the given fractions. Any of trainingFraction, validationFraction and testFraction may optionally be provided, they must sum to up to 1. If the provided ones sum to less than 1, the remainder is assigned to sets as decided by Vertex AI. If none of the fractions are set, by default roughly 80% of data is used for training, 10% for validation, and 10% for test.
Fields
trainingFraction
number
The fraction of the input data that is to be used to train the Model.
validationFraction
number
The fraction of the input data that is to be used to validate the Model.
testFraction
number
The fraction of the input data that is to be used to evaluate the Model.
Assigns input data to training, validation, and test sets based on the given filters, data pieces not matched by any filter are ignored. Currently only supported for Datasets containing DataItems. If any of the filters in this message are to match nothing, then they can be set as '-' (the minus sign).
Supported only for unstructured Datasets.
Fields
trainingFilter
string
Required. A filter on DataItems of the Dataset. DataItems that match this filter are used to train the Model. A filter with same syntax as the one used in DatasetService.ListDataItems may be used. If a single DataItem is matched by more than one of the FilterSplit filters, then it is assigned to the first set that applies to it in the training, validation, test order.
validationFilter
string
Required. A filter on DataItems of the Dataset. DataItems that match this filter are used to validate the Model. A filter with same syntax as the one used in DatasetService.ListDataItems may be used. If a single DataItem is matched by more than one of the FilterSplit filters, then it is assigned to the first set that applies to it in the training, validation, test order.
testFilter
string
Required. A filter on DataItems of the Dataset. DataItems that match this filter are used to test the Model. A filter with same syntax as the one used in DatasetService.ListDataItems may be used. If a single DataItem is matched by more than one of the FilterSplit filters, then it is assigned to the first set that applies to it in the training, validation, test order.
ExportUse indicates the usage of the exported files. It restricts file destination, format, annotations to be exported, whether to allow unannotated data to be exported and whether to clone files to temp Cloud Storage bucket.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-27 UTC."],[],[],null,["# Method: datasets.export\n\n**Full name**: projects.locations.datasets.export\n\nExports data from a Dataset. \n\n### Endpoint\n\npost `https:``/``/{service-endpoint}``/v1``/{name}:export` \nWhere `{service-endpoint}` is one of the [supported service endpoints](/vertex-ai/docs/reference/rest#rest_endpoints).\n\n### Path parameters\n\n`name` `string` \nRequired. The name of the Dataset resource. Format: `projects/{project}/locations/{location}/datasets/{dataset}`\n\n### Request body\n\nThe request body contains data with the following structure:\nFields `exportConfig` `object (`[ExportDataConfig](/vertex-ai/docs/reference/rest/v1/projects.locations.datasets/export#ExportDataConfig)`)` \nRequired. The desired output location. \n\n### Response body\n\nIf successful, the response body contains an instance of [Operation](/vertex-ai/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation).\n\nExportDataConfig\n----------------\n\nDescribes what part of the Dataset is to be exported, the destination of the export and how to export.\nFields `annotationsFilter` `string` \nAn expression for filtering what part of the Dataset is to be exported. Only Annotations that match this filter will be exported. The filter syntax is the same as in [ListAnnotations](/vertex-ai/docs/reference/rest/v1/projects.locations.datasets.dataItems.annotations/list#google.cloud.aiplatform.v1.DatasetService.ListAnnotations).\n`savedQueryId` `string` \nThe id of a SavedQuery (annotation set) under the Dataset specified by [ExportDataRequest.name](/vertex-ai/docs/reference/rest/v1/projects.locations.datasets/export#body.PATH_PARAMETERS.name) used for filtering Annotations for training.\n\nOnly used for custom training data export use cases. Only applicable to Datasets that have SavedQueries.\n\nOnly Annotations that are associated with this SavedQuery are used in respectively training. When used in conjunction with [annotationsFilter](/vertex-ai/docs/reference/rest/v1/projects.locations.datasets/export#ExportDataConfig.FIELDS.annotations_filter), the Annotations used for training are filtered by both [savedQueryId](/vertex-ai/docs/reference/rest/v1/projects.locations.datasets/export#ExportDataConfig.FIELDS.saved_query_id) and [annotationsFilter](/vertex-ai/docs/reference/rest/v1/projects.locations.datasets/export#ExportDataConfig.FIELDS.annotations_filter).\n\nOnly one of [savedQueryId](/vertex-ai/docs/reference/rest/v1/projects.locations.datasets/export#ExportDataConfig.FIELDS.saved_query_id) and [annotationSchemaUri](/vertex-ai/docs/reference/rest/v1/projects.locations.datasets/export#ExportDataConfig.FIELDS.annotation_schema_uri) should be specified as both of them represent the same thing: problem type.\n`annotationSchemaUri` `string` \nThe Cloud Storage URI that points to a YAML file describing the annotation schema. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). The schema files that can be used here are found in gs://google-cloud-aiplatform/schema/dataset/annotation/, note that the chosen schema must be consistent with [metadata](/vertex-ai/docs/reference/rest/v1/projects.locations.datasets#Dataset.FIELDS.metadata_schema_uri) of the Dataset specified by [ExportDataRequest.name](/vertex-ai/docs/reference/rest/v1/projects.locations.datasets/export#body.PATH_PARAMETERS.name).\n\nOnly used for custom training data export use cases. Only applicable to Datasets that have DataItems and Annotations.\n\nOnly Annotations that both match this schema and belong to DataItems not ignored by the split method are used in respectively training, validation or test role, depending on the role of the DataItem they are on.\n\nWhen used in conjunction with [annotationsFilter](/vertex-ai/docs/reference/rest/v1/projects.locations.datasets/export#ExportDataConfig.FIELDS.annotations_filter), the Annotations used for training are filtered by both [annotationsFilter](/vertex-ai/docs/reference/rest/v1/projects.locations.datasets/export#ExportDataConfig.FIELDS.annotations_filter) and [annotationSchemaUri](/vertex-ai/docs/reference/rest/v1/projects.locations.datasets/export#ExportDataConfig.FIELDS.annotation_schema_uri).\n`exportUse` `enum (`[ExportUse](/vertex-ai/docs/reference/rest/v1/projects.locations.datasets/export#ExportUse)`)` \nIndicates the usage of the exported files. \n`destination` `Union type` \nThe destination of the output. `destination` can be only one of the following:\n`gcsDestination` `object (`[GcsDestination](/vertex-ai/docs/reference/rest/v1/GcsDestination)`)` \nThe Google Cloud Storage location where the output is to be written to. In the given directory a new directory will be created with name: `export-data-\u003cdataset-display-name\u003e-\u003ctimestamp-of-export-call\u003e` where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export output will be written into that directory. Inside that directory, annotations with the same schema will be grouped into sub directories which are named with the corresponding annotations' schema title. Inside these sub directories, a schema.yaml will be created to describe the output format. \n`split` `Union type` \nThe instructions how the export data should be split between the training, validation and test sets. `split` can be only one of the following:\n`fractionSplit` `object (`[ExportFractionSplit](/vertex-ai/docs/reference/rest/v1/projects.locations.datasets/export#ExportFractionSplit)`)` \nSplit based on fractions defining the size of each set.\n`filterSplit` `object (`[ExportFilterSplit](/vertex-ai/docs/reference/rest/v1/projects.locations.datasets/export#ExportFilterSplit)`)` \nSplit based on the provided filters for each set. \n\nExportFractionSplit\n-------------------\n\nAssigns the input data to training, validation, and test sets as per the given fractions. Any of `trainingFraction`, `validationFraction` and `testFraction` may optionally be provided, they must sum to up to 1. If the provided ones sum to less than 1, the remainder is assigned to sets as decided by Vertex AI. If none of the fractions are set, by default roughly 80% of data is used for training, 10% for validation, and 10% for test.\nFields `trainingFraction` `number` \nThe fraction of the input data that is to be used to train the Model.\n`validationFraction` `number` \nThe fraction of the input data that is to be used to validate the Model.\n`testFraction` `number` \nThe fraction of the input data that is to be used to evaluate the Model. \n\nExportFilterSplit\n-----------------\n\nAssigns input data to training, validation, and test sets based on the given filters, data pieces not matched by any filter are ignored. Currently only supported for Datasets containing DataItems. If any of the filters in this message are to match nothing, then they can be set as '-' (the minus sign).\n\nSupported only for unstructured Datasets.\nFields `trainingFilter` `string` \nRequired. A filter on DataItems of the Dataset. DataItems that match this filter are used to train the Model. A filter with same syntax as the one used in [DatasetService.ListDataItems](/vertex-ai/docs/reference/rest/v1/projects.locations.datasets.dataItems/list#google.cloud.aiplatform.v1.DatasetService.ListDataItems) may be used. If a single DataItem is matched by more than one of the FilterSplit filters, then it is assigned to the first set that applies to it in the training, validation, test order.\n`validationFilter` `string` \nRequired. A filter on DataItems of the Dataset. DataItems that match this filter are used to validate the Model. A filter with same syntax as the one used in [DatasetService.ListDataItems](/vertex-ai/docs/reference/rest/v1/projects.locations.datasets.dataItems/list#google.cloud.aiplatform.v1.DatasetService.ListDataItems) may be used. If a single DataItem is matched by more than one of the FilterSplit filters, then it is assigned to the first set that applies to it in the training, validation, test order.\n`testFilter` `string` \nRequired. A filter on DataItems of the Dataset. DataItems that match this filter are used to test the Model. A filter with same syntax as the one used in [DatasetService.ListDataItems](/vertex-ai/docs/reference/rest/v1/projects.locations.datasets.dataItems/list#google.cloud.aiplatform.v1.DatasetService.ListDataItems) may be used. If a single DataItem is matched by more than one of the FilterSplit filters, then it is assigned to the first set that applies to it in the training, validation, test order. \n\nExportUse\n---------\n\nExportUse indicates the usage of the exported files. It restricts file destination, format, annotations to be exported, whether to allow unannotated data to be exported and whether to clone files to temp Cloud Storage bucket."]]