# Class DataScan (2.20.0)

2.20.0 (latest) 2.19.0 2.16.0 2.15.0 2.14.0 2.13.0 2.12.0 2.11.0 2.10.2 2.9.0 2.8.0 2.7.1 2.6.0 2.5.0 2.4.0 2.3.1 2.2.2 2.1.0 2.0.1 1.13.0 1.12.3 1.11.0 1.10.0 1.9.0 1.8.1 1.7.0 1.6.2 1.5.1 1.4.3 1.3.0 1.2.0 1.1.3 1.0.1 0.2.1 0.1.0

    DataScan(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Represents a user-visible job which provides the insights for the
related data source.

For example:

- Data quality: generates queries based on the rules and runs against the data to get data quality check results. For more information, see `Auto data quality
  overview <https://cloud.google.com/dataplex/docs/auto-data-quality-overview>`__.
- Data profile: analyzes the data in tables and generates insights about the structure, content and relationships (such as null percent, cardinality, min/max/mean, etc). For more information, see `About data
  profiling <https://cloud.google.com/dataplex/docs/data-profiling-overview>`__.
- Data discovery: scans data in Cloud Storage buckets to extract and then catalog metadata. For more information, see `Discover and
  catalog Cloud Storage
  data <https://cloud.google.com/bigquery/docs/automatic-discovery>`__.
- Data documentation: analyzes the table or dataset metadata and generates insights. For tables, insights include descriptions and sample SQL queries. For datasets, insights include descriptions, schema relationships and sample SQL queries. For more information, see `Generate data insights in
  BigQuery <https://cloud.google.com/bigquery/docs/data-insights>`__.

This message has `oneof`_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.

.. _oneof: <https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields>

| ## Attributes ||
|---|---|
| **Name** | **Description** |
| `name` | `str` 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. |
| `uid` | `str` 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. |
| `description` | `str` Optional. Description of the scan. - Must be between 1-1024 characters. |
| `display_name` | `str` Optional. User friendly display name. - Must be between 1-256 characters. |
| `labels` | `MutableMapping[str, str]` Optional. User-defined labels for the scan. |
| `state` | `https://docs.cloud.google.com/python/docs/reference/dataplex/latest/google.cloud.dataplex_v1.types.State` Output only. Current state of the DataScan. |
| `create_time` | `google.protobuf.timestamp_pb2.Timestamp` Output only. The time when the scan was created. |
| `update_time` | `google.protobuf.timestamp_pb2.Timestamp` Output only. The time when the scan was last updated. |
| `data` | `https://docs.cloud.google.com/python/docs/reference/dataplex/latest/google.cloud.dataplex_v1.types.DataSource` Required. The data source for DataScan. |
| `execution_spec` | `https://docs.cloud.google.com/python/docs/reference/dataplex/latest/google.cloud.dataplex_v1.types.DataScan.ExecutionSpec` Optional. DataScan execution settings. If not specified, the fields in it will use their default values. |
| `execution_status` | `https://docs.cloud.google.com/python/docs/reference/dataplex/latest/google.cloud.dataplex_v1.types.DataScan.ExecutionStatus` Output only. Status of the data scan execution. |
| `type_` | `https://docs.cloud.google.com/python/docs/reference/dataplex/latest/google.cloud.dataplex_v1.types.DataScanType` Output only. The type of DataScan. |
| `data_quality_spec` | `https://docs.cloud.google.com/python/docs/reference/dataplex/latest/google.cloud.dataplex_v1.types.DataQualitySpec` Settings for a data quality scan. This field is a member of `oneof`_ `spec`. |
| `data_profile_spec` | `https://docs.cloud.google.com/python/docs/reference/dataplex/latest/google.cloud.dataplex_v1.types.DataProfileSpec` Settings for a data profile scan. This field is a member of `oneof`_ `spec`. |
| `data_discovery_spec` | `https://docs.cloud.google.com/python/docs/reference/dataplex/latest/google.cloud.dataplex_v1.types.DataDiscoverySpec` Settings for a data discovery scan. This field is a member of `oneof`_ `spec`. |
| `data_documentation_spec` | `https://docs.cloud.google.com/python/docs/reference/dataplex/latest/google.cloud.dataplex_v1.types.DataDocumentationSpec` Settings for a data documentation scan. This field is a member of `oneof`_ `spec`. |
| `data_quality_result` | `https://docs.cloud.google.com/python/docs/reference/dataplex/latest/google.cloud.dataplex_v1.types.DataQualityResult` Output only. The result of a data quality scan. This field is a member of `oneof`_ `result`. |
| `data_profile_result` | `https://docs.cloud.google.com/python/docs/reference/dataplex/latest/google.cloud.dataplex_v1.types.DataProfileResult` Output only. The result of a data profile scan. This field is a member of `oneof`_ `result`. |
| `data_discovery_result` | `https://docs.cloud.google.com/python/docs/reference/dataplex/latest/google.cloud.dataplex_v1.types.DataDiscoveryResult` Output only. The result of a data discovery scan. This field is a member of `oneof`_ `result`. |
| `data_documentation_result` | `https://docs.cloud.google.com/python/docs/reference/dataplex/latest/google.cloud.dataplex_v1.types.DataDocumentationResult` Output only. The result of a data documentation scan. This field is a member of `oneof`_ `result`. |
| `execution_identity` | `https://docs.cloud.google.com/python/docs/reference/dataplex/latest/google.cloud.dataplex_v1.types.ExecutionIdentity` Optional. Immutable. The identity to run the datascan. If not specified, defaults to the Dataplex Service Agent. |

## Classes

### ExecutionSpec

    ExecutionSpec(mapping=None, *, ignore_unknown_fields=False, **kwargs)

DataScan execution settings.

.. _oneof: <https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields>

### ExecutionStatus

    ExecutionStatus(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Status of the data scan execution.

### LabelsEntry

    LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The abstract base class for a message.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `kwargs` | `dict` Keys and values corresponding to the fields of the message. |
| `mapping` | ``Union[dict, `.Message`]`` A dictionary or message to be used to determine the values for this message. |
| `ignore_unknown_fields` | `Optional(bool)` If True, do not raise errors for unknown fields. Only applied if `mapping` is a mapping type or there are keyword parameters. |