Skip to main content

datasets

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

Overview

Namedatasets
TypeResource
Idgoogle.healthcare.datasets

Fields

NameDatatypeDescription
namestringIdentifier. Resource name of the dataset, of the form projects/{project_id}/locations/{location_id}/datasets/{dataset_id}.
encryptionSpecobjectRepresents a customer-managed encryption key spec that can be applied to a resource.
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

NameAccessible byRequired ParamsDescription
getSELECTdatasetsId, locationsId, projectsIdGets any metadata associated with a dataset.
listSELECTlocationsId, projectsIdLists the health datasets in the current project.
createINSERTlocationsId, projectsIdCreates 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.
deleteDELETEdatasetsId, locationsId, projectsIdDeletes 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).
patchUPDATEdatasetsId, locationsId, projectsIdUpdates dataset metadata.
deidentifyEXECdatasetsId, locationsId, projectsIdCreates 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.

SELECT examples

Lists the health datasets in the current project.

SELECT
name,
encryptionSpec,
timeZone
FROM google.healthcare.datasets
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new datasets resource.

/*+ create */
INSERT INTO google.healthcare.datasets (
locationsId,
projectsId,
name,
timeZone,
encryptionSpec
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ timeZone }}',
'{{ encryptionSpec }}'
;

UPDATE example

Updates a datasets resource.

/*+ update */
UPDATE google.healthcare.datasets
SET
name = '{{ name }}',
timeZone = '{{ timeZone }}',
encryptionSpec = '{{ encryptionSpec }}'
WHERE
datasetsId = '{{ datasetsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified datasets resource.

/*+ delete */
DELETE FROM google.healthcare.datasets
WHERE datasetsId = '{{ datasetsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';