NAME
    gcloud alpha dataplex datascans create data-quality - create a Dataplex
        data quality scan job

SYNOPSIS
    gcloud alpha dataplex datascans create data-quality
        (DATASCAN : --location=LOCATION)
        --data-quality-spec-file=DATA_QUALITY_SPEC_FILE
        (--data-source-entity=DATA_SOURCE_ENTITY
          | --data-source-resource=DATA_SOURCE_RESOURCE)
        [--description=DESCRIPTION] [--display-name=DISPLAY_NAME]
        [--labels=[KEY=VALUE,...]] [--async | --validate-only]
        [--incremental-field=INCREMENTAL_FIELD --on-demand=ON_DEMAND
          | --schedule=SCHEDULE | --one-time
          --ttl-after-scan-completion=TTL_AFTER_SCAN_COMPLETION
          --service-account=SERVICE_ACCOUNT | --use-user-credential]
        [GCLOUD_WIDE_FLAG ...]

DESCRIPTION
    (ALPHA) Represents a user-visible job which provides the insights for the
    related data source and generates queries based on the rules and runs
    against the data to get data quality check results.

EXAMPLES
    To create a data quality scan data-quality-datascan in project test-project
    located in us-central1 on bigquery resource table test-table in dataset
    test-dataset with data spec file data-quality-spec.json, run:

        $ gcloud alpha dataplex datascans create data-quality \
            data-quality-datascan --project=test-project \
            --location=us-central1 \
            --data-source-resource="//bigquery.googleapis.com/projects/test-\
        project/datasets/test-dataset/tables/test-table" \
            --data-quality-spec-file="data-quality-spec.json"

POSITIONAL ARGUMENTS
     Datascan resource - Arguments and flags that define the Dataplex datascan
     you want to create a data quality scan for. The arguments in this group
     can be used to specify the attributes of this resource. (NOTE) Some
     attributes are not given arguments in this group but can be set in other
     ways.

     To set the project attribute:
      ◆ provide the argument datascan on the command line with a fully
        specified name;
      ◆ provide the argument --project on the command line;
      ◆ set the property core/project.

     This must be specified.

       DATASCAN
          ID of the datascan or fully qualified identifier for the datascan.

          To set the dataScans attribute:
          ▸ provide the argument datascan on the command line.

          This positional argument must be specified if any of the other
          arguments in this group are specified.

       --location=LOCATION
          The location of the Dataplex resource.

          To set the location attribute:
          ▸ provide the argument datascan on the command line with a fully
            specified name;
          ▸ provide the argument --location on the command line;
          ▸ set the property dataplex/location.

REQUIRED FLAGS
     --data-quality-spec-file=DATA_QUALITY_SPEC_FILE
        Path to the JSON/YAML file containing the spec for the data quality
        scan. The JSON representation reference:
        https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualitySpec
        The YAML representation reference:
        https://cloud.google.com/dataplex/docs/use-auto-data-quality#create-scan-using-gcloud

     Data source for the data quality scan.

     Exactly one of these must be specified:

       --data-source-entity=DATA_SOURCE_ENTITY
          Dataplex entity that contains the data for the data quality scan, of
          the form:
          projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.

       --data-source-resource=DATA_SOURCE_RESOURCE
          Fully-qualified service resource name of the cloud resource that
          contains the data for the data quality scan, of the form:
          //bigquery.googleapis.com/projects/{project_number}/datasets/{dataset_id}/tables/{table_id}.

OPTIONAL FLAGS
     --description=DESCRIPTION
        Description of the data quality scan.

     --display-name=DISPLAY_NAME
        Display name of the data quality scan.

     --labels=[KEY=VALUE,...]
        List of label KEY=VALUE pairs to add.

        Keys must start with a lowercase character and contain only hyphens
        (-), underscores (_), lowercase characters, and numbers. Values must
        contain only hyphens (-), underscores (_), lowercase characters, and
        numbers.

     At most one of --async | --validate-only can be specified.

     At most one of these can be specified:

       --async
          Return immediately, without waiting for the operation in progress to
          complete.

       --validate-only
          Validate the create action, but don't actually perform it.

     Data quality scan execution settings.

     --incremental-field=INCREMENTAL_FIELD
        Field that contains values that monotonically increase over time (e.g.
        timestamp).

     Data quality scan scheduling and trigger settings

     At most one of these can be specified:

       --on-demand=ON_DEMAND
          If set, the scan runs one-time shortly after data quality scan
          creation.

       --schedule=SCHEDULE
          Cron schedule (https://en.wikipedia.org/wiki/Cron) for running scans
          periodically. To explicitly set a timezone to the cron tab, apply a
          prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or
          "TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid
          string from IANA time zone database. For example,
          CRON_TZ=America/New_York 1 * * * * or TZ=America/New_York 1 * * * *.
          This field is required for RECURRING scans.

       Or at least one of these can be specified:

         Data quality scan one-time trigger settings.

         --one-time
            If set, the data quality scan runs once, and auto deleted once the
            ttl_after_scan_completion expires.

         --ttl-after-scan-completion=TTL_AFTER_SCAN_COMPLETION
            The time to live for one-time scans. Default value is 24 hours,
            minimum value is 0 seconds, and maximum value is 365 days. The time
            is calculated from the data scan job completion time. If value is
            set as 0 seconds, the scan will be immediately deleted upon job
            completion, regardless of whether the job succeeded or failed. The
            value should be a number followed by a unit suffix "s". Example:
            "100s" for 100 seconds.The argument is only valid when --one-time
            is set.

     Identity to run the datascan.

     At most one of these can be specified:

       --service-account=SERVICE_ACCOUNT
          Service account email to run the scan as.

       --use-user-credential
          If set, the scan runs with the caller's credential.

GCLOUD WIDE FLAGS
    These flags are available to all commands: --access-token-file, --account,
    --billing-project, --configuration, --flags-file, --flatten, --format,
    --help, --impersonate-service-account, --log-http, --project, --quiet,
    --trace-token, --user-output-enabled, --verbosity.

    Run $ gcloud help for details.

NOTES
    This command is currently in alpha and might change without notice. If this
    command fails with API permission errors despite specifying the correct
    project, you might be trying to access an API with an invitation-only early
    access allowlist. This variant is also available:

        $ gcloud dataplex datascans create data-quality

