data_scans
Creates, updates, deletes, gets or lists a data_scans
resource.
Overview
Name | data_scans |
Type | Resource |
Id | google.dataplex.data_scans |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_data_scans_get
- projects_locations_data_scans_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Identifier. The relative resource name of the scan, of the form: projects/{project}/locations/{location_id}/dataScans/{datascan_id}, where project refers to a project_id or project_number and location_id refers to a Google Cloud region. |
createTime | string (google-datetime) | Output only. The time when the scan was created. |
data | object | Required. The data source for DataScan. (id: GoogleCloudDataplexV1DataSource) |
dataDiscoveryResult | object | Output only. The result of a data discovery scan. (id: GoogleCloudDataplexV1DataDiscoveryResult) |
dataDiscoverySpec | object | Settings for a data discovery scan. (id: GoogleCloudDataplexV1DataDiscoverySpec) |
dataProfileResult | object | Output only. The result of a data profile scan. (id: GoogleCloudDataplexV1DataProfileResult) |
dataProfileSpec | object | Settings for a data profile scan. (id: GoogleCloudDataplexV1DataProfileSpec) |
dataQualityResult | object | Output only. The result of a data quality scan. (id: GoogleCloudDataplexV1DataQualityResult) |
dataQualitySpec | object | Settings for a data quality scan. (id: GoogleCloudDataplexV1DataQualitySpec) |
description | string | Optional. Description of the scan. Must be between 1-1024 characters. |
displayName | string | Optional. User friendly display name. Must be between 1-256 characters. |
executionSpec | object | Optional. DataScan execution settings.If not specified, the fields in it will use their default values. (id: GoogleCloudDataplexV1DataScanExecutionSpec) |
executionStatus | object | Output only. Status of the data scan execution. (id: GoogleCloudDataplexV1DataScanExecutionStatus) |
labels | object | Optional. User-defined labels for the scan. |
state | string | Output only. Current state of the DataScan. |
type | string | Output only. The type of DataScan. |
uid | string | Output only. System generated globally unique ID for the scan. This ID will be different if the scan is deleted and re-created with the same name. |
updateTime | string (google-datetime) | Output only. The time when the scan was last updated. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Identifier. The relative resource name of the scan, of the form: projects/{project}/locations/{location_id}/dataScans/{datascan_id}, where project refers to a project_id or project_number and location_id refers to a Google Cloud region. |
createTime | string (google-datetime) | Output only. The time when the scan was created. |
data | object | Required. The data source for DataScan. (id: GoogleCloudDataplexV1DataSource) |
dataDiscoveryResult | object | Output only. The result of a data discovery scan. (id: GoogleCloudDataplexV1DataDiscoveryResult) |
dataDiscoverySpec | object | Settings for a data discovery scan. (id: GoogleCloudDataplexV1DataDiscoverySpec) |
dataProfileResult | object | Output only. The result of a data profile scan. (id: GoogleCloudDataplexV1DataProfileResult) |
dataProfileSpec | object | Settings for a data profile scan. (id: GoogleCloudDataplexV1DataProfileSpec) |
dataQualityResult | object | Output only. The result of a data quality scan. (id: GoogleCloudDataplexV1DataQualityResult) |
dataQualitySpec | object | Settings for a data quality scan. (id: GoogleCloudDataplexV1DataQualitySpec) |
description | string | Optional. Description of the scan. Must be between 1-1024 characters. |
displayName | string | Optional. User friendly display name. Must be between 1-256 characters. |
executionSpec | object | Optional. DataScan execution settings.If not specified, the fields in it will use their default values. (id: GoogleCloudDataplexV1DataScanExecutionSpec) |
executionStatus | object | Output only. Status of the data scan execution. (id: GoogleCloudDataplexV1DataScanExecutionStatus) |
labels | object | Optional. User-defined labels for the scan. |
state | string | Output only. Current state of the DataScan. |
type | string | Output only. The type of DataScan. |
uid | string | Output only. System generated globally unique ID for the scan. This ID will be different if the scan is deleted and re-created with the same name. |
updateTime | string (google-datetime) | Output only. The time when the scan was last updated. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_locations_data_scans_get | select | projectsId , locationsId , dataScansId | view | Gets a DataScan resource. |
projects_locations_data_scans_list | select | projectsId , locationsId | pageSize , pageToken , filter , orderBy | Lists DataScans. |
projects_locations_data_scans_create | insert | projectsId , locationsId | dataScanId , validateOnly | Creates a DataScan resource. |
projects_locations_data_scans_patch | update | projectsId , locationsId , dataScansId | updateMask , validateOnly | Updates a DataScan resource. |
projects_locations_data_scans_delete | delete | projectsId , locationsId , dataScansId | force | Deletes a DataScan resource. |
projects_locations_data_scans_run | exec | projectsId , locationsId , dataScansId | Runs an on-demand execution of a DataScan | |
projects_locations_data_scans_generate_data_quality_rules | exec | projectsId , locationsId , dataScansId | Generates recommended data quality rules based on the results of a data profiling scan.Use the recommendations to build rules for a data quality scan. |
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.
Name | Datatype | Description |
---|---|---|
dataScansId | string | |
locationsId | string | |
projectsId | string | |
dataScanId | string | |
filter | string | |
force | boolean | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) | |
validateOnly | boolean | |
view | string |
SELECT
examples
- projects_locations_data_scans_get
- projects_locations_data_scans_list
Gets a DataScan resource.
SELECT
name,
createTime,
data,
dataDiscoveryResult,
dataDiscoverySpec,
dataProfileResult,
dataProfileSpec,
dataQualityResult,
dataQualitySpec,
description,
displayName,
executionSpec,
executionStatus,
labels,
state,
type,
uid,
updateTime
FROM google.dataplex.data_scans
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND dataScansId = '{{ dataScansId }}' -- required
AND view = '{{ view }}';
Lists DataScans.
SELECT
name,
createTime,
data,
dataDiscoveryResult,
dataDiscoverySpec,
dataProfileResult,
dataProfileSpec,
dataQualityResult,
dataQualitySpec,
description,
displayName,
executionSpec,
executionStatus,
labels,
state,
type,
uid,
updateTime
FROM google.dataplex.data_scans
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- projects_locations_data_scans_create
- Manifest
Creates a DataScan resource.
INSERT INTO google.dataplex.data_scans (
data__description,
data__displayName,
data__labels,
data__data,
data__executionSpec,
data__dataQualitySpec,
data__dataProfileSpec,
data__dataDiscoverySpec,
projectsId,
locationsId,
dataScanId,
validateOnly
)
SELECT
'{{ description }}',
'{{ displayName }}',
'{{ labels }}',
'{{ data }}',
'{{ executionSpec }}',
'{{ dataQualitySpec }}',
'{{ dataProfileSpec }}',
'{{ dataDiscoverySpec }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ dataScanId }}',
'{{ validateOnly }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: data_scans
props:
- name: projectsId
value: string
description: Required parameter for the data_scans resource.
- name: locationsId
value: string
description: Required parameter for the data_scans resource.
- name: description
value: string
description: >
Optional. Description of the scan. Must be between 1-1024 characters.
- name: displayName
value: string
description: >
Optional. User friendly display name. Must be between 1-256 characters.
- name: labels
value: object
description: >
Optional. User-defined labels for the scan.
- name: data
value: object
description: >
Required. The data source for DataScan.
- name: executionSpec
value: object
description: >
Optional. DataScan execution settings.If not specified, the fields in it will use their default values.
- name: dataQualitySpec
value: object
description: >
Settings for a data quality scan.
- name: dataProfileSpec
value: object
description: >
Settings for a data profile scan.
- name: dataDiscoverySpec
value: object
description: >
Settings for a data discovery scan.
- name: dataScanId
value: string
- name: validateOnly
value: boolean
UPDATE
examples
- projects_locations_data_scans_patch
Updates a DataScan resource.
UPDATE google.dataplex.data_scans
SET
data__description = '{{ description }}',
data__displayName = '{{ displayName }}',
data__labels = '{{ labels }}',
data__data = '{{ data }}',
data__executionSpec = '{{ executionSpec }}',
data__dataQualitySpec = '{{ dataQualitySpec }}',
data__dataProfileSpec = '{{ dataProfileSpec }}',
data__dataDiscoverySpec = '{{ dataDiscoverySpec }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND dataScansId = '{{ dataScansId }}' --required
AND updateMask = '{{ updateMask}}'
AND validateOnly = {{ validateOnly}}
RETURNING
name,
done,
error,
metadata,
response;
DELETE
examples
- projects_locations_data_scans_delete
Deletes a DataScan resource.
DELETE FROM google.dataplex.data_scans
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND dataScansId = '{{ dataScansId }}' --required
AND force = '{{ force }}';
Lifecycle Methods
- projects_locations_data_scans_run
- projects_locations_data_scans_generate_data_quality_rules
Runs an on-demand execution of a DataScan
EXEC google.dataplex.data_scans.projects_locations_data_scans_run
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@dataScansId='{{ dataScansId }}' --required;
Generates recommended data quality rules based on the results of a data profiling scan.Use the recommendations to build rules for a data quality scan.
EXEC google.dataplex.data_scans.projects_locations_data_scans_generate_data_quality_rules
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@dataScansId='{{ dataScansId }}' --required;