Skip to main content

datasets

Creates, updates, deletes, gets or lists a datasets resource.

Overview

Namedatasets
TypeResource
Idgoogle.healthcare.datasets

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. Resource name of the dataset, of the form projects/{project_id}/locations/{location_id}/datasets/{dataset_id}.
encryptionSpecobjectOptional. Customer-managed encryption key spec for a Dataset. If set, this Dataset and all of its sub-resources will be secured by this key. If empty, the Dataset is secured by the default Google encryption key. (id: EncryptionSpec)
satisfiesPzibooleanOutput only. Whether the dataset satisfies zone isolation.
satisfiesPzsbooleanOutput only. Whether the dataset satisfies zone separation.
timeZonestringOptional. The default timezone used by this dataset. Must be a either a valid IANA time zone name such as "America/New_York" or empty, which defaults to UTC. This is used for parsing times in resources, such as HL7 messages, where no explicit timezone is specified.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, datasetsIdGets any metadata associated with a dataset.
listselectprojectsId, locationsIdpageSize, pageTokenLists the health datasets in the current project.
createinsertprojectsId, locationsIddatasetIdCreates a new health dataset. Results are returned through the Operation interface which returns either an Operation.response which contains a Dataset or Operation.error. The metadata field type is OperationMetadata.
patchupdateprojectsId, locationsId, datasetsIdupdateMaskUpdates dataset metadata.
deletedeleteprojectsId, locationsId, datasetsIdDeletes the specified health dataset and all data contained in the dataset. Deleting a dataset does not affect the sources from which the dataset was imported (if any).
deidentifyexecprojectsId, locationsId, datasetsIdCreates a new dataset containing de-identified data from the source dataset. The metadata field type is OperationMetadata. If the request is successful, the response field type is DeidentifySummary. If errors occur, error is set. The LRO result may still be successful if de-identification fails for some DICOM instances. The new de-identified dataset will not contain these failed resources. Failed resource totals are tracked in Operation.metadata. Error details are also logged to Cloud Logging. For more information, see Viewing error logs in Cloud Logging.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
datasetsIdstring
locationsIdstring
projectsIdstring
datasetIdstring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

Gets any metadata associated with a dataset.

SELECT
name,
encryptionSpec,
satisfiesPzi,
satisfiesPzs,
timeZone
FROM google.healthcare.datasets
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND datasetsId = '{{ datasetsId }}' -- required;

INSERT examples

Creates a new health dataset. Results are returned through the Operation interface which returns either an Operation.response which contains a Dataset or Operation.error. The metadata field type is OperationMetadata.

INSERT INTO google.healthcare.datasets (
data__name,
data__timeZone,
data__encryptionSpec,
projectsId,
locationsId,
datasetId
)
SELECT
'{{ name }}',
'{{ timeZone }}',
'{{ encryptionSpec }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ datasetId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates dataset metadata.

UPDATE google.healthcare.datasets
SET
data__name = '{{ name }}',
data__timeZone = '{{ timeZone }}',
data__encryptionSpec = '{{ encryptionSpec }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND datasetsId = '{{ datasetsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
encryptionSpec,
satisfiesPzi,
satisfiesPzs,
timeZone;

DELETE examples

Deletes the specified health dataset and all data contained in the dataset. Deleting a dataset does not affect the sources from which the dataset was imported (if any).

DELETE FROM google.healthcare.datasets
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND datasetsId = '{{ datasetsId }}' --required;

Lifecycle Methods

Creates a new dataset containing de-identified data from the source dataset. The metadata field type is OperationMetadata. If the request is successful, the response field type is DeidentifySummary. If errors occur, error is set. The LRO result may still be successful if de-identification fails for some DICOM instances. The new de-identified dataset will not contain these failed resources. Failed resource totals are tracked in Operation.metadata. Error details are also logged to Cloud Logging. For more information, see Viewing error logs in Cloud Logging.

EXEC google.healthcare.datasets.deidentify 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@datasetsId='{{ datasetsId }}' --required
@@json=
'{
"destinationDataset": "{{ destinationDataset }}",
"config": "{{ config }}",
"gcsConfigUri": "{{ gcsConfigUri }}"
}';