Class: Google::Cloud::Dataplex::V1::DataQualityRule

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/dataplex/v1/data_quality.rb

Overview

A rule captures data quality intent about a data source.

Defined Under Namespace

Classes: NonNullExpectation, RangeExpectation, RegexExpectation, RowConditionExpectation, SetExpectation, SqlAssertion, StatisticRangeExpectation, TableConditionExpectation, UniquenessExpectation

Instance Attribute Summary collapse

Instance Attribute Details

#column::String

Returns Optional. The unnested column which this rule is evaluated against.

Returns:

  • (::String)

    Optional. The unnested column which this rule is evaluated against.



362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
# File 'proto_docs/google/cloud/dataplex/v1/data_quality.rb', line 362

class DataQualityRule
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Evaluates whether each column value lies between a specified range.
  # @!attribute [rw] min_value
  #   @return [::String]
  #     Optional. The minimum column value allowed for a row to pass this
  #     validation. At least one of `min_value` and `max_value` need to be
  #     provided.
  # @!attribute [rw] max_value
  #   @return [::String]
  #     Optional. The maximum column value allowed for a row to pass this
  #     validation. At least one of `min_value` and `max_value` need to be
  #     provided.
  # @!attribute [rw] strict_min_enabled
  #   @return [::Boolean]
  #     Optional. Whether each value needs to be strictly greater than ('>') the
  #     minimum, or if equality is allowed.
  #
  #     Only relevant if a `min_value` has been defined. Default = false.
  # @!attribute [rw] strict_max_enabled
  #   @return [::Boolean]
  #     Optional. Whether each value needs to be strictly lesser than ('<') the
  #     maximum, or if equality is allowed.
  #
  #     Only relevant if a `max_value` has been defined. Default = false.
  class RangeExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value is null.
  class NonNullExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value is contained by a specified set.
  # @!attribute [rw] values
  #   @return [::Array<::String>]
  #     Optional. Expected values for the column value.
  class SetExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value matches a specified regex.
  # @!attribute [rw] regex
  #   @return [::String]
  #     Optional. A regular expression the column value is expected to match.
  class RegexExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the column has duplicates.
  class UniquenessExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the column aggregate statistic lies between a specified
  # range.
  # @!attribute [rw] statistic
  #   @return [::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation::ColumnStatistic]
  #     Optional. The aggregate metric to evaluate.
  # @!attribute [rw] min_value
  #   @return [::String]
  #     Optional. The minimum column statistic value allowed for a row to pass
  #     this validation.
  #
  #     At least one of `min_value` and `max_value` need to be provided.
  # @!attribute [rw] max_value
  #   @return [::String]
  #     Optional. The maximum column statistic value allowed for a row to pass
  #     this validation.
  #
  #     At least one of `min_value` and `max_value` need to be provided.
  # @!attribute [rw] strict_min_enabled
  #   @return [::Boolean]
  #     Optional. Whether column statistic needs to be strictly greater than
  #     ('>') the minimum, or if equality is allowed.
  #
  #     Only relevant if a `min_value` has been defined. Default = false.
  # @!attribute [rw] strict_max_enabled
  #   @return [::Boolean]
  #     Optional. Whether column statistic needs to be strictly lesser than ('<')
  #     the maximum, or if equality is allowed.
  #
  #     Only relevant if a `max_value` has been defined. Default = false.
  class StatisticRangeExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The list of aggregate metrics a rule can be evaluated against.
    module ColumnStatistic
      # Unspecified statistic type
      STATISTIC_UNDEFINED = 0

      # Evaluate the column mean
      MEAN = 1

      # Evaluate the column min
      MIN = 2

      # Evaluate the column max
      MAX = 3
    end
  end

  # Evaluates whether each row passes the specified condition.
  #
  # The SQL expression needs to use BigQuery standard SQL syntax and should
  # produce a boolean value per row as the result.
  #
  # Example: col1 >= 0 AND col2 < 10
  # @!attribute [rw] sql_expression
  #   @return [::String]
  #     Optional. The SQL expression.
  class RowConditionExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the provided expression is true.
  #
  # The SQL expression needs to use BigQuery standard SQL syntax and should
  # produce a scalar boolean result.
  #
  # Example: MIN(col1) >= 0
  # @!attribute [rw] sql_expression
  #   @return [::String]
  #     Optional. The SQL expression.
  class TableConditionExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A SQL statement that is evaluated to return rows that match an invalid
  # state. If any rows are are returned, this rule fails.
  #
  # The SQL statement must use BigQuery standard SQL syntax, and must not
  # contain any semicolons.
  #
  # You can use the data reference parameter `${data()}` to reference the
  # source table with all of its precondition filters applied. Examples of
  # precondition filters include row filters, incremental data filters, and
  # sampling. For more information, see [Data reference
  # parameter](https://cloud.google.com/dataplex/docs/auto-data-quality-overview#data-reference-parameter).
  #
  # Example: `SELECT * FROM ${data()} WHERE price < 0`
  # @!attribute [rw] sql_statement
  #   @return [::String]
  #     Optional. The SQL statement.
  class SqlAssertion
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#description::String

Returns Optional. Description of the rule.

  • The maximum length is 1,024 characters.

Returns:

  • (::String)

    Optional. Description of the rule.

    • The maximum length is 1,024 characters.


362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
# File 'proto_docs/google/cloud/dataplex/v1/data_quality.rb', line 362

class DataQualityRule
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Evaluates whether each column value lies between a specified range.
  # @!attribute [rw] min_value
  #   @return [::String]
  #     Optional. The minimum column value allowed for a row to pass this
  #     validation. At least one of `min_value` and `max_value` need to be
  #     provided.
  # @!attribute [rw] max_value
  #   @return [::String]
  #     Optional. The maximum column value allowed for a row to pass this
  #     validation. At least one of `min_value` and `max_value` need to be
  #     provided.
  # @!attribute [rw] strict_min_enabled
  #   @return [::Boolean]
  #     Optional. Whether each value needs to be strictly greater than ('>') the
  #     minimum, or if equality is allowed.
  #
  #     Only relevant if a `min_value` has been defined. Default = false.
  # @!attribute [rw] strict_max_enabled
  #   @return [::Boolean]
  #     Optional. Whether each value needs to be strictly lesser than ('<') the
  #     maximum, or if equality is allowed.
  #
  #     Only relevant if a `max_value` has been defined. Default = false.
  class RangeExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value is null.
  class NonNullExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value is contained by a specified set.
  # @!attribute [rw] values
  #   @return [::Array<::String>]
  #     Optional. Expected values for the column value.
  class SetExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value matches a specified regex.
  # @!attribute [rw] regex
  #   @return [::String]
  #     Optional. A regular expression the column value is expected to match.
  class RegexExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the column has duplicates.
  class UniquenessExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the column aggregate statistic lies between a specified
  # range.
  # @!attribute [rw] statistic
  #   @return [::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation::ColumnStatistic]
  #     Optional. The aggregate metric to evaluate.
  # @!attribute [rw] min_value
  #   @return [::String]
  #     Optional. The minimum column statistic value allowed for a row to pass
  #     this validation.
  #
  #     At least one of `min_value` and `max_value` need to be provided.
  # @!attribute [rw] max_value
  #   @return [::String]
  #     Optional. The maximum column statistic value allowed for a row to pass
  #     this validation.
  #
  #     At least one of `min_value` and `max_value` need to be provided.
  # @!attribute [rw] strict_min_enabled
  #   @return [::Boolean]
  #     Optional. Whether column statistic needs to be strictly greater than
  #     ('>') the minimum, or if equality is allowed.
  #
  #     Only relevant if a `min_value` has been defined. Default = false.
  # @!attribute [rw] strict_max_enabled
  #   @return [::Boolean]
  #     Optional. Whether column statistic needs to be strictly lesser than ('<')
  #     the maximum, or if equality is allowed.
  #
  #     Only relevant if a `max_value` has been defined. Default = false.
  class StatisticRangeExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The list of aggregate metrics a rule can be evaluated against.
    module ColumnStatistic
      # Unspecified statistic type
      STATISTIC_UNDEFINED = 0

      # Evaluate the column mean
      MEAN = 1

      # Evaluate the column min
      MIN = 2

      # Evaluate the column max
      MAX = 3
    end
  end

  # Evaluates whether each row passes the specified condition.
  #
  # The SQL expression needs to use BigQuery standard SQL syntax and should
  # produce a boolean value per row as the result.
  #
  # Example: col1 >= 0 AND col2 < 10
  # @!attribute [rw] sql_expression
  #   @return [::String]
  #     Optional. The SQL expression.
  class RowConditionExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the provided expression is true.
  #
  # The SQL expression needs to use BigQuery standard SQL syntax and should
  # produce a scalar boolean result.
  #
  # Example: MIN(col1) >= 0
  # @!attribute [rw] sql_expression
  #   @return [::String]
  #     Optional. The SQL expression.
  class TableConditionExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A SQL statement that is evaluated to return rows that match an invalid
  # state. If any rows are are returned, this rule fails.
  #
  # The SQL statement must use BigQuery standard SQL syntax, and must not
  # contain any semicolons.
  #
  # You can use the data reference parameter `${data()}` to reference the
  # source table with all of its precondition filters applied. Examples of
  # precondition filters include row filters, incremental data filters, and
  # sampling. For more information, see [Data reference
  # parameter](https://cloud.google.com/dataplex/docs/auto-data-quality-overview#data-reference-parameter).
  #
  # Example: `SELECT * FROM ${data()} WHERE price < 0`
  # @!attribute [rw] sql_statement
  #   @return [::String]
  #     Optional. The SQL statement.
  class SqlAssertion
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#dimension::String

Returns Required. The dimension a rule belongs to. Results are also aggregated at the dimension level. Supported dimensions are ["COMPLETENESS", "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "INTEGRITY"].

Returns:

  • (::String)

    Required. The dimension a rule belongs to. Results are also aggregated at the dimension level. Supported dimensions are ["COMPLETENESS", "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "INTEGRITY"]



362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
# File 'proto_docs/google/cloud/dataplex/v1/data_quality.rb', line 362

class DataQualityRule
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Evaluates whether each column value lies between a specified range.
  # @!attribute [rw] min_value
  #   @return [::String]
  #     Optional. The minimum column value allowed for a row to pass this
  #     validation. At least one of `min_value` and `max_value` need to be
  #     provided.
  # @!attribute [rw] max_value
  #   @return [::String]
  #     Optional. The maximum column value allowed for a row to pass this
  #     validation. At least one of `min_value` and `max_value` need to be
  #     provided.
  # @!attribute [rw] strict_min_enabled
  #   @return [::Boolean]
  #     Optional. Whether each value needs to be strictly greater than ('>') the
  #     minimum, or if equality is allowed.
  #
  #     Only relevant if a `min_value` has been defined. Default = false.
  # @!attribute [rw] strict_max_enabled
  #   @return [::Boolean]
  #     Optional. Whether each value needs to be strictly lesser than ('<') the
  #     maximum, or if equality is allowed.
  #
  #     Only relevant if a `max_value` has been defined. Default = false.
  class RangeExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value is null.
  class NonNullExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value is contained by a specified set.
  # @!attribute [rw] values
  #   @return [::Array<::String>]
  #     Optional. Expected values for the column value.
  class SetExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value matches a specified regex.
  # @!attribute [rw] regex
  #   @return [::String]
  #     Optional. A regular expression the column value is expected to match.
  class RegexExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the column has duplicates.
  class UniquenessExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the column aggregate statistic lies between a specified
  # range.
  # @!attribute [rw] statistic
  #   @return [::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation::ColumnStatistic]
  #     Optional. The aggregate metric to evaluate.
  # @!attribute [rw] min_value
  #   @return [::String]
  #     Optional. The minimum column statistic value allowed for a row to pass
  #     this validation.
  #
  #     At least one of `min_value` and `max_value` need to be provided.
  # @!attribute [rw] max_value
  #   @return [::String]
  #     Optional. The maximum column statistic value allowed for a row to pass
  #     this validation.
  #
  #     At least one of `min_value` and `max_value` need to be provided.
  # @!attribute [rw] strict_min_enabled
  #   @return [::Boolean]
  #     Optional. Whether column statistic needs to be strictly greater than
  #     ('>') the minimum, or if equality is allowed.
  #
  #     Only relevant if a `min_value` has been defined. Default = false.
  # @!attribute [rw] strict_max_enabled
  #   @return [::Boolean]
  #     Optional. Whether column statistic needs to be strictly lesser than ('<')
  #     the maximum, or if equality is allowed.
  #
  #     Only relevant if a `max_value` has been defined. Default = false.
  class StatisticRangeExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The list of aggregate metrics a rule can be evaluated against.
    module ColumnStatistic
      # Unspecified statistic type
      STATISTIC_UNDEFINED = 0

      # Evaluate the column mean
      MEAN = 1

      # Evaluate the column min
      MIN = 2

      # Evaluate the column max
      MAX = 3
    end
  end

  # Evaluates whether each row passes the specified condition.
  #
  # The SQL expression needs to use BigQuery standard SQL syntax and should
  # produce a boolean value per row as the result.
  #
  # Example: col1 >= 0 AND col2 < 10
  # @!attribute [rw] sql_expression
  #   @return [::String]
  #     Optional. The SQL expression.
  class RowConditionExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the provided expression is true.
  #
  # The SQL expression needs to use BigQuery standard SQL syntax and should
  # produce a scalar boolean result.
  #
  # Example: MIN(col1) >= 0
  # @!attribute [rw] sql_expression
  #   @return [::String]
  #     Optional. The SQL expression.
  class TableConditionExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A SQL statement that is evaluated to return rows that match an invalid
  # state. If any rows are are returned, this rule fails.
  #
  # The SQL statement must use BigQuery standard SQL syntax, and must not
  # contain any semicolons.
  #
  # You can use the data reference parameter `${data()}` to reference the
  # source table with all of its precondition filters applied. Examples of
  # precondition filters include row filters, incremental data filters, and
  # sampling. For more information, see [Data reference
  # parameter](https://cloud.google.com/dataplex/docs/auto-data-quality-overview#data-reference-parameter).
  #
  # Example: `SELECT * FROM ${data()} WHERE price < 0`
  # @!attribute [rw] sql_statement
  #   @return [::String]
  #     Optional. The SQL statement.
  class SqlAssertion
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#ignore_null::Boolean

Returns Optional. Rows with null values will automatically fail a rule, unless ignore_null is true. In that case, such null rows are trivially considered passing.

This field is only valid for the following type of rules:

  • RangeExpectation
  • RegexExpectation
  • SetExpectation
  • UniquenessExpectation.

Returns:

  • (::Boolean)

    Optional. Rows with null values will automatically fail a rule, unless ignore_null is true. In that case, such null rows are trivially considered passing.

    This field is only valid for the following type of rules:

    • RangeExpectation
    • RegexExpectation
    • SetExpectation
    • UniquenessExpectation


362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
# File 'proto_docs/google/cloud/dataplex/v1/data_quality.rb', line 362

class DataQualityRule
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Evaluates whether each column value lies between a specified range.
  # @!attribute [rw] min_value
  #   @return [::String]
  #     Optional. The minimum column value allowed for a row to pass this
  #     validation. At least one of `min_value` and `max_value` need to be
  #     provided.
  # @!attribute [rw] max_value
  #   @return [::String]
  #     Optional. The maximum column value allowed for a row to pass this
  #     validation. At least one of `min_value` and `max_value` need to be
  #     provided.
  # @!attribute [rw] strict_min_enabled
  #   @return [::Boolean]
  #     Optional. Whether each value needs to be strictly greater than ('>') the
  #     minimum, or if equality is allowed.
  #
  #     Only relevant if a `min_value` has been defined. Default = false.
  # @!attribute [rw] strict_max_enabled
  #   @return [::Boolean]
  #     Optional. Whether each value needs to be strictly lesser than ('<') the
  #     maximum, or if equality is allowed.
  #
  #     Only relevant if a `max_value` has been defined. Default = false.
  class RangeExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value is null.
  class NonNullExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value is contained by a specified set.
  # @!attribute [rw] values
  #   @return [::Array<::String>]
  #     Optional. Expected values for the column value.
  class SetExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value matches a specified regex.
  # @!attribute [rw] regex
  #   @return [::String]
  #     Optional. A regular expression the column value is expected to match.
  class RegexExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the column has duplicates.
  class UniquenessExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the column aggregate statistic lies between a specified
  # range.
  # @!attribute [rw] statistic
  #   @return [::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation::ColumnStatistic]
  #     Optional. The aggregate metric to evaluate.
  # @!attribute [rw] min_value
  #   @return [::String]
  #     Optional. The minimum column statistic value allowed for a row to pass
  #     this validation.
  #
  #     At least one of `min_value` and `max_value` need to be provided.
  # @!attribute [rw] max_value
  #   @return [::String]
  #     Optional. The maximum column statistic value allowed for a row to pass
  #     this validation.
  #
  #     At least one of `min_value` and `max_value` need to be provided.
  # @!attribute [rw] strict_min_enabled
  #   @return [::Boolean]
  #     Optional. Whether column statistic needs to be strictly greater than
  #     ('>') the minimum, or if equality is allowed.
  #
  #     Only relevant if a `min_value` has been defined. Default = false.
  # @!attribute [rw] strict_max_enabled
  #   @return [::Boolean]
  #     Optional. Whether column statistic needs to be strictly lesser than ('<')
  #     the maximum, or if equality is allowed.
  #
  #     Only relevant if a `max_value` has been defined. Default = false.
  class StatisticRangeExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The list of aggregate metrics a rule can be evaluated against.
    module ColumnStatistic
      # Unspecified statistic type
      STATISTIC_UNDEFINED = 0

      # Evaluate the column mean
      MEAN = 1

      # Evaluate the column min
      MIN = 2

      # Evaluate the column max
      MAX = 3
    end
  end

  # Evaluates whether each row passes the specified condition.
  #
  # The SQL expression needs to use BigQuery standard SQL syntax and should
  # produce a boolean value per row as the result.
  #
  # Example: col1 >= 0 AND col2 < 10
  # @!attribute [rw] sql_expression
  #   @return [::String]
  #     Optional. The SQL expression.
  class RowConditionExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the provided expression is true.
  #
  # The SQL expression needs to use BigQuery standard SQL syntax and should
  # produce a scalar boolean result.
  #
  # Example: MIN(col1) >= 0
  # @!attribute [rw] sql_expression
  #   @return [::String]
  #     Optional. The SQL expression.
  class TableConditionExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A SQL statement that is evaluated to return rows that match an invalid
  # state. If any rows are are returned, this rule fails.
  #
  # The SQL statement must use BigQuery standard SQL syntax, and must not
  # contain any semicolons.
  #
  # You can use the data reference parameter `${data()}` to reference the
  # source table with all of its precondition filters applied. Examples of
  # precondition filters include row filters, incremental data filters, and
  # sampling. For more information, see [Data reference
  # parameter](https://cloud.google.com/dataplex/docs/auto-data-quality-overview#data-reference-parameter).
  #
  # Example: `SELECT * FROM ${data()} WHERE price < 0`
  # @!attribute [rw] sql_statement
  #   @return [::String]
  #     Optional. The SQL statement.
  class SqlAssertion
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#name::String

Returns Optional. A mutable name for the rule.

  • The name must contain only letters (a-z, A-Z), numbers (0-9), or hyphens (-).
  • The maximum length is 63 characters.
  • Must start with a letter.
  • Must end with a number or a letter.

Returns:

  • (::String)

    Optional. A mutable name for the rule.

    • The name must contain only letters (a-z, A-Z), numbers (0-9), or hyphens (-).
    • The maximum length is 63 characters.
    • Must start with a letter.
    • Must end with a number or a letter.


362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
# File 'proto_docs/google/cloud/dataplex/v1/data_quality.rb', line 362

class DataQualityRule
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Evaluates whether each column value lies between a specified range.
  # @!attribute [rw] min_value
  #   @return [::String]
  #     Optional. The minimum column value allowed for a row to pass this
  #     validation. At least one of `min_value` and `max_value` need to be
  #     provided.
  # @!attribute [rw] max_value
  #   @return [::String]
  #     Optional. The maximum column value allowed for a row to pass this
  #     validation. At least one of `min_value` and `max_value` need to be
  #     provided.
  # @!attribute [rw] strict_min_enabled
  #   @return [::Boolean]
  #     Optional. Whether each value needs to be strictly greater than ('>') the
  #     minimum, or if equality is allowed.
  #
  #     Only relevant if a `min_value` has been defined. Default = false.
  # @!attribute [rw] strict_max_enabled
  #   @return [::Boolean]
  #     Optional. Whether each value needs to be strictly lesser than ('<') the
  #     maximum, or if equality is allowed.
  #
  #     Only relevant if a `max_value` has been defined. Default = false.
  class RangeExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value is null.
  class NonNullExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value is contained by a specified set.
  # @!attribute [rw] values
  #   @return [::Array<::String>]
  #     Optional. Expected values for the column value.
  class SetExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value matches a specified regex.
  # @!attribute [rw] regex
  #   @return [::String]
  #     Optional. A regular expression the column value is expected to match.
  class RegexExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the column has duplicates.
  class UniquenessExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the column aggregate statistic lies between a specified
  # range.
  # @!attribute [rw] statistic
  #   @return [::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation::ColumnStatistic]
  #     Optional. The aggregate metric to evaluate.
  # @!attribute [rw] min_value
  #   @return [::String]
  #     Optional. The minimum column statistic value allowed for a row to pass
  #     this validation.
  #
  #     At least one of `min_value` and `max_value` need to be provided.
  # @!attribute [rw] max_value
  #   @return [::String]
  #     Optional. The maximum column statistic value allowed for a row to pass
  #     this validation.
  #
  #     At least one of `min_value` and `max_value` need to be provided.
  # @!attribute [rw] strict_min_enabled
  #   @return [::Boolean]
  #     Optional. Whether column statistic needs to be strictly greater than
  #     ('>') the minimum, or if equality is allowed.
  #
  #     Only relevant if a `min_value` has been defined. Default = false.
  # @!attribute [rw] strict_max_enabled
  #   @return [::Boolean]
  #     Optional. Whether column statistic needs to be strictly lesser than ('<')
  #     the maximum, or if equality is allowed.
  #
  #     Only relevant if a `max_value` has been defined. Default = false.
  class StatisticRangeExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The list of aggregate metrics a rule can be evaluated against.
    module ColumnStatistic
      # Unspecified statistic type
      STATISTIC_UNDEFINED = 0

      # Evaluate the column mean
      MEAN = 1

      # Evaluate the column min
      MIN = 2

      # Evaluate the column max
      MAX = 3
    end
  end

  # Evaluates whether each row passes the specified condition.
  #
  # The SQL expression needs to use BigQuery standard SQL syntax and should
  # produce a boolean value per row as the result.
  #
  # Example: col1 >= 0 AND col2 < 10
  # @!attribute [rw] sql_expression
  #   @return [::String]
  #     Optional. The SQL expression.
  class RowConditionExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the provided expression is true.
  #
  # The SQL expression needs to use BigQuery standard SQL syntax and should
  # produce a scalar boolean result.
  #
  # Example: MIN(col1) >= 0
  # @!attribute [rw] sql_expression
  #   @return [::String]
  #     Optional. The SQL expression.
  class TableConditionExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A SQL statement that is evaluated to return rows that match an invalid
  # state. If any rows are are returned, this rule fails.
  #
  # The SQL statement must use BigQuery standard SQL syntax, and must not
  # contain any semicolons.
  #
  # You can use the data reference parameter `${data()}` to reference the
  # source table with all of its precondition filters applied. Examples of
  # precondition filters include row filters, incremental data filters, and
  # sampling. For more information, see [Data reference
  # parameter](https://cloud.google.com/dataplex/docs/auto-data-quality-overview#data-reference-parameter).
  #
  # Example: `SELECT * FROM ${data()} WHERE price < 0`
  # @!attribute [rw] sql_statement
  #   @return [::String]
  #     Optional. The SQL statement.
  class SqlAssertion
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#non_null_expectation::Google::Cloud::Dataplex::V1::DataQualityRule::NonNullExpectation

Returns Row-level rule which evaluates whether each column value is null.

Returns:



362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
# File 'proto_docs/google/cloud/dataplex/v1/data_quality.rb', line 362

class DataQualityRule
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Evaluates whether each column value lies between a specified range.
  # @!attribute [rw] min_value
  #   @return [::String]
  #     Optional. The minimum column value allowed for a row to pass this
  #     validation. At least one of `min_value` and `max_value` need to be
  #     provided.
  # @!attribute [rw] max_value
  #   @return [::String]
  #     Optional. The maximum column value allowed for a row to pass this
  #     validation. At least one of `min_value` and `max_value` need to be
  #     provided.
  # @!attribute [rw] strict_min_enabled
  #   @return [::Boolean]
  #     Optional. Whether each value needs to be strictly greater than ('>') the
  #     minimum, or if equality is allowed.
  #
  #     Only relevant if a `min_value` has been defined. Default = false.
  # @!attribute [rw] strict_max_enabled
  #   @return [::Boolean]
  #     Optional. Whether each value needs to be strictly lesser than ('<') the
  #     maximum, or if equality is allowed.
  #
  #     Only relevant if a `max_value` has been defined. Default = false.
  class RangeExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value is null.
  class NonNullExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value is contained by a specified set.
  # @!attribute [rw] values
  #   @return [::Array<::String>]
  #     Optional. Expected values for the column value.
  class SetExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value matches a specified regex.
  # @!attribute [rw] regex
  #   @return [::String]
  #     Optional. A regular expression the column value is expected to match.
  class RegexExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the column has duplicates.
  class UniquenessExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the column aggregate statistic lies between a specified
  # range.
  # @!attribute [rw] statistic
  #   @return [::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation::ColumnStatistic]
  #     Optional. The aggregate metric to evaluate.
  # @!attribute [rw] min_value
  #   @return [::String]
  #     Optional. The minimum column statistic value allowed for a row to pass
  #     this validation.
  #
  #     At least one of `min_value` and `max_value` need to be provided.
  # @!attribute [rw] max_value
  #   @return [::String]
  #     Optional. The maximum column statistic value allowed for a row to pass
  #     this validation.
  #
  #     At least one of `min_value` and `max_value` need to be provided.
  # @!attribute [rw] strict_min_enabled
  #   @return [::Boolean]
  #     Optional. Whether column statistic needs to be strictly greater than
  #     ('>') the minimum, or if equality is allowed.
  #
  #     Only relevant if a `min_value` has been defined. Default = false.
  # @!attribute [rw] strict_max_enabled
  #   @return [::Boolean]
  #     Optional. Whether column statistic needs to be strictly lesser than ('<')
  #     the maximum, or if equality is allowed.
  #
  #     Only relevant if a `max_value` has been defined. Default = false.
  class StatisticRangeExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The list of aggregate metrics a rule can be evaluated against.
    module ColumnStatistic
      # Unspecified statistic type
      STATISTIC_UNDEFINED = 0

      # Evaluate the column mean
      MEAN = 1

      # Evaluate the column min
      MIN = 2

      # Evaluate the column max
      MAX = 3
    end
  end

  # Evaluates whether each row passes the specified condition.
  #
  # The SQL expression needs to use BigQuery standard SQL syntax and should
  # produce a boolean value per row as the result.
  #
  # Example: col1 >= 0 AND col2 < 10
  # @!attribute [rw] sql_expression
  #   @return [::String]
  #     Optional. The SQL expression.
  class RowConditionExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the provided expression is true.
  #
  # The SQL expression needs to use BigQuery standard SQL syntax and should
  # produce a scalar boolean result.
  #
  # Example: MIN(col1) >= 0
  # @!attribute [rw] sql_expression
  #   @return [::String]
  #     Optional. The SQL expression.
  class TableConditionExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A SQL statement that is evaluated to return rows that match an invalid
  # state. If any rows are are returned, this rule fails.
  #
  # The SQL statement must use BigQuery standard SQL syntax, and must not
  # contain any semicolons.
  #
  # You can use the data reference parameter `${data()}` to reference the
  # source table with all of its precondition filters applied. Examples of
  # precondition filters include row filters, incremental data filters, and
  # sampling. For more information, see [Data reference
  # parameter](https://cloud.google.com/dataplex/docs/auto-data-quality-overview#data-reference-parameter).
  #
  # Example: `SELECT * FROM ${data()} WHERE price < 0`
  # @!attribute [rw] sql_statement
  #   @return [::String]
  #     Optional. The SQL statement.
  class SqlAssertion
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#range_expectation::Google::Cloud::Dataplex::V1::DataQualityRule::RangeExpectation

Returns Row-level rule which evaluates whether each column value lies between a specified range.

Returns:



362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
# File 'proto_docs/google/cloud/dataplex/v1/data_quality.rb', line 362

class DataQualityRule
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Evaluates whether each column value lies between a specified range.
  # @!attribute [rw] min_value
  #   @return [::String]
  #     Optional. The minimum column value allowed for a row to pass this
  #     validation. At least one of `min_value` and `max_value` need to be
  #     provided.
  # @!attribute [rw] max_value
  #   @return [::String]
  #     Optional. The maximum column value allowed for a row to pass this
  #     validation. At least one of `min_value` and `max_value` need to be
  #     provided.
  # @!attribute [rw] strict_min_enabled
  #   @return [::Boolean]
  #     Optional. Whether each value needs to be strictly greater than ('>') the
  #     minimum, or if equality is allowed.
  #
  #     Only relevant if a `min_value` has been defined. Default = false.
  # @!attribute [rw] strict_max_enabled
  #   @return [::Boolean]
  #     Optional. Whether each value needs to be strictly lesser than ('<') the
  #     maximum, or if equality is allowed.
  #
  #     Only relevant if a `max_value` has been defined. Default = false.
  class RangeExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value is null.
  class NonNullExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value is contained by a specified set.
  # @!attribute [rw] values
  #   @return [::Array<::String>]
  #     Optional. Expected values for the column value.
  class SetExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value matches a specified regex.
  # @!attribute [rw] regex
  #   @return [::String]
  #     Optional. A regular expression the column value is expected to match.
  class RegexExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the column has duplicates.
  class UniquenessExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the column aggregate statistic lies between a specified
  # range.
  # @!attribute [rw] statistic
  #   @return [::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation::ColumnStatistic]
  #     Optional. The aggregate metric to evaluate.
  # @!attribute [rw] min_value
  #   @return [::String]
  #     Optional. The minimum column statistic value allowed for a row to pass
  #     this validation.
  #
  #     At least one of `min_value` and `max_value` need to be provided.
  # @!attribute [rw] max_value
  #   @return [::String]
  #     Optional. The maximum column statistic value allowed for a row to pass
  #     this validation.
  #
  #     At least one of `min_value` and `max_value` need to be provided.
  # @!attribute [rw] strict_min_enabled
  #   @return [::Boolean]
  #     Optional. Whether column statistic needs to be strictly greater than
  #     ('>') the minimum, or if equality is allowed.
  #
  #     Only relevant if a `min_value` has been defined. Default = false.
  # @!attribute [rw] strict_max_enabled
  #   @return [::Boolean]
  #     Optional. Whether column statistic needs to be strictly lesser than ('<')
  #     the maximum, or if equality is allowed.
  #
  #     Only relevant if a `max_value` has been defined. Default = false.
  class StatisticRangeExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The list of aggregate metrics a rule can be evaluated against.
    module ColumnStatistic
      # Unspecified statistic type
      STATISTIC_UNDEFINED = 0

      # Evaluate the column mean
      MEAN = 1

      # Evaluate the column min
      MIN = 2

      # Evaluate the column max
      MAX = 3
    end
  end

  # Evaluates whether each row passes the specified condition.
  #
  # The SQL expression needs to use BigQuery standard SQL syntax and should
  # produce a boolean value per row as the result.
  #
  # Example: col1 >= 0 AND col2 < 10
  # @!attribute [rw] sql_expression
  #   @return [::String]
  #     Optional. The SQL expression.
  class RowConditionExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the provided expression is true.
  #
  # The SQL expression needs to use BigQuery standard SQL syntax and should
  # produce a scalar boolean result.
  #
  # Example: MIN(col1) >= 0
  # @!attribute [rw] sql_expression
  #   @return [::String]
  #     Optional. The SQL expression.
  class TableConditionExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A SQL statement that is evaluated to return rows that match an invalid
  # state. If any rows are are returned, this rule fails.
  #
  # The SQL statement must use BigQuery standard SQL syntax, and must not
  # contain any semicolons.
  #
  # You can use the data reference parameter `${data()}` to reference the
  # source table with all of its precondition filters applied. Examples of
  # precondition filters include row filters, incremental data filters, and
  # sampling. For more information, see [Data reference
  # parameter](https://cloud.google.com/dataplex/docs/auto-data-quality-overview#data-reference-parameter).
  #
  # Example: `SELECT * FROM ${data()} WHERE price < 0`
  # @!attribute [rw] sql_statement
  #   @return [::String]
  #     Optional. The SQL statement.
  class SqlAssertion
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#regex_expectation::Google::Cloud::Dataplex::V1::DataQualityRule::RegexExpectation

Returns Row-level rule which evaluates whether each column value matches a specified regex.

Returns:



362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
# File 'proto_docs/google/cloud/dataplex/v1/data_quality.rb', line 362

class DataQualityRule
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Evaluates whether each column value lies between a specified range.
  # @!attribute [rw] min_value
  #   @return [::String]
  #     Optional. The minimum column value allowed for a row to pass this
  #     validation. At least one of `min_value` and `max_value` need to be
  #     provided.
  # @!attribute [rw] max_value
  #   @return [::String]
  #     Optional. The maximum column value allowed for a row to pass this
  #     validation. At least one of `min_value` and `max_value` need to be
  #     provided.
  # @!attribute [rw] strict_min_enabled
  #   @return [::Boolean]
  #     Optional. Whether each value needs to be strictly greater than ('>') the
  #     minimum, or if equality is allowed.
  #
  #     Only relevant if a `min_value` has been defined. Default = false.
  # @!attribute [rw] strict_max_enabled
  #   @return [::Boolean]
  #     Optional. Whether each value needs to be strictly lesser than ('<') the
  #     maximum, or if equality is allowed.
  #
  #     Only relevant if a `max_value` has been defined. Default = false.
  class RangeExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value is null.
  class NonNullExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value is contained by a specified set.
  # @!attribute [rw] values
  #   @return [::Array<::String>]
  #     Optional. Expected values for the column value.
  class SetExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value matches a specified regex.
  # @!attribute [rw] regex
  #   @return [::String]
  #     Optional. A regular expression the column value is expected to match.
  class RegexExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the column has duplicates.
  class UniquenessExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the column aggregate statistic lies between a specified
  # range.
  # @!attribute [rw] statistic
  #   @return [::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation::ColumnStatistic]
  #     Optional. The aggregate metric to evaluate.
  # @!attribute [rw] min_value
  #   @return [::String]
  #     Optional. The minimum column statistic value allowed for a row to pass
  #     this validation.
  #
  #     At least one of `min_value` and `max_value` need to be provided.
  # @!attribute [rw] max_value
  #   @return [::String]
  #     Optional. The maximum column statistic value allowed for a row to pass
  #     this validation.
  #
  #     At least one of `min_value` and `max_value` need to be provided.
  # @!attribute [rw] strict_min_enabled
  #   @return [::Boolean]
  #     Optional. Whether column statistic needs to be strictly greater than
  #     ('>') the minimum, or if equality is allowed.
  #
  #     Only relevant if a `min_value` has been defined. Default = false.
  # @!attribute [rw] strict_max_enabled
  #   @return [::Boolean]
  #     Optional. Whether column statistic needs to be strictly lesser than ('<')
  #     the maximum, or if equality is allowed.
  #
  #     Only relevant if a `max_value` has been defined. Default = false.
  class StatisticRangeExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The list of aggregate metrics a rule can be evaluated against.
    module ColumnStatistic
      # Unspecified statistic type
      STATISTIC_UNDEFINED = 0

      # Evaluate the column mean
      MEAN = 1

      # Evaluate the column min
      MIN = 2

      # Evaluate the column max
      MAX = 3
    end
  end

  # Evaluates whether each row passes the specified condition.
  #
  # The SQL expression needs to use BigQuery standard SQL syntax and should
  # produce a boolean value per row as the result.
  #
  # Example: col1 >= 0 AND col2 < 10
  # @!attribute [rw] sql_expression
  #   @return [::String]
  #     Optional. The SQL expression.
  class RowConditionExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the provided expression is true.
  #
  # The SQL expression needs to use BigQuery standard SQL syntax and should
  # produce a scalar boolean result.
  #
  # Example: MIN(col1) >= 0
  # @!attribute [rw] sql_expression
  #   @return [::String]
  #     Optional. The SQL expression.
  class TableConditionExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A SQL statement that is evaluated to return rows that match an invalid
  # state. If any rows are are returned, this rule fails.
  #
  # The SQL statement must use BigQuery standard SQL syntax, and must not
  # contain any semicolons.
  #
  # You can use the data reference parameter `${data()}` to reference the
  # source table with all of its precondition filters applied. Examples of
  # precondition filters include row filters, incremental data filters, and
  # sampling. For more information, see [Data reference
  # parameter](https://cloud.google.com/dataplex/docs/auto-data-quality-overview#data-reference-parameter).
  #
  # Example: `SELECT * FROM ${data()} WHERE price < 0`
  # @!attribute [rw] sql_statement
  #   @return [::String]
  #     Optional. The SQL statement.
  class SqlAssertion
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#row_condition_expectation::Google::Cloud::Dataplex::V1::DataQualityRule::RowConditionExpectation

Returns Row-level rule which evaluates whether each row in a table passes the specified condition.

Returns:



362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
# File 'proto_docs/google/cloud/dataplex/v1/data_quality.rb', line 362

class DataQualityRule
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Evaluates whether each column value lies between a specified range.
  # @!attribute [rw] min_value
  #   @return [::String]
  #     Optional. The minimum column value allowed for a row to pass this
  #     validation. At least one of `min_value` and `max_value` need to be
  #     provided.
  # @!attribute [rw] max_value
  #   @return [::String]
  #     Optional. The maximum column value allowed for a row to pass this
  #     validation. At least one of `min_value` and `max_value` need to be
  #     provided.
  # @!attribute [rw] strict_min_enabled
  #   @return [::Boolean]
  #     Optional. Whether each value needs to be strictly greater than ('>') the
  #     minimum, or if equality is allowed.
  #
  #     Only relevant if a `min_value` has been defined. Default = false.
  # @!attribute [rw] strict_max_enabled
  #   @return [::Boolean]
  #     Optional. Whether each value needs to be strictly lesser than ('<') the
  #     maximum, or if equality is allowed.
  #
  #     Only relevant if a `max_value` has been defined. Default = false.
  class RangeExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value is null.
  class NonNullExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value is contained by a specified set.
  # @!attribute [rw] values
  #   @return [::Array<::String>]
  #     Optional. Expected values for the column value.
  class SetExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value matches a specified regex.
  # @!attribute [rw] regex
  #   @return [::String]
  #     Optional. A regular expression the column value is expected to match.
  class RegexExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the column has duplicates.
  class UniquenessExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the column aggregate statistic lies between a specified
  # range.
  # @!attribute [rw] statistic
  #   @return [::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation::ColumnStatistic]
  #     Optional. The aggregate metric to evaluate.
  # @!attribute [rw] min_value
  #   @return [::String]
  #     Optional. The minimum column statistic value allowed for a row to pass
  #     this validation.
  #
  #     At least one of `min_value` and `max_value` need to be provided.
  # @!attribute [rw] max_value
  #   @return [::String]
  #     Optional. The maximum column statistic value allowed for a row to pass
  #     this validation.
  #
  #     At least one of `min_value` and `max_value` need to be provided.
  # @!attribute [rw] strict_min_enabled
  #   @return [::Boolean]
  #     Optional. Whether column statistic needs to be strictly greater than
  #     ('>') the minimum, or if equality is allowed.
  #
  #     Only relevant if a `min_value` has been defined. Default = false.
  # @!attribute [rw] strict_max_enabled
  #   @return [::Boolean]
  #     Optional. Whether column statistic needs to be strictly lesser than ('<')
  #     the maximum, or if equality is allowed.
  #
  #     Only relevant if a `max_value` has been defined. Default = false.
  class StatisticRangeExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The list of aggregate metrics a rule can be evaluated against.
    module ColumnStatistic
      # Unspecified statistic type
      STATISTIC_UNDEFINED = 0

      # Evaluate the column mean
      MEAN = 1

      # Evaluate the column min
      MIN = 2

      # Evaluate the column max
      MAX = 3
    end
  end

  # Evaluates whether each row passes the specified condition.
  #
  # The SQL expression needs to use BigQuery standard SQL syntax and should
  # produce a boolean value per row as the result.
  #
  # Example: col1 >= 0 AND col2 < 10
  # @!attribute [rw] sql_expression
  #   @return [::String]
  #     Optional. The SQL expression.
  class RowConditionExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the provided expression is true.
  #
  # The SQL expression needs to use BigQuery standard SQL syntax and should
  # produce a scalar boolean result.
  #
  # Example: MIN(col1) >= 0
  # @!attribute [rw] sql_expression
  #   @return [::String]
  #     Optional. The SQL expression.
  class TableConditionExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A SQL statement that is evaluated to return rows that match an invalid
  # state. If any rows are are returned, this rule fails.
  #
  # The SQL statement must use BigQuery standard SQL syntax, and must not
  # contain any semicolons.
  #
  # You can use the data reference parameter `${data()}` to reference the
  # source table with all of its precondition filters applied. Examples of
  # precondition filters include row filters, incremental data filters, and
  # sampling. For more information, see [Data reference
  # parameter](https://cloud.google.com/dataplex/docs/auto-data-quality-overview#data-reference-parameter).
  #
  # Example: `SELECT * FROM ${data()} WHERE price < 0`
  # @!attribute [rw] sql_statement
  #   @return [::String]
  #     Optional. The SQL statement.
  class SqlAssertion
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#set_expectation::Google::Cloud::Dataplex::V1::DataQualityRule::SetExpectation

Returns Row-level rule which evaluates whether each column value is contained by a specified set.

Returns:



362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
# File 'proto_docs/google/cloud/dataplex/v1/data_quality.rb', line 362

class DataQualityRule
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Evaluates whether each column value lies between a specified range.
  # @!attribute [rw] min_value
  #   @return [::String]
  #     Optional. The minimum column value allowed for a row to pass this
  #     validation. At least one of `min_value` and `max_value` need to be
  #     provided.
  # @!attribute [rw] max_value
  #   @return [::String]
  #     Optional. The maximum column value allowed for a row to pass this
  #     validation. At least one of `min_value` and `max_value` need to be
  #     provided.
  # @!attribute [rw] strict_min_enabled
  #   @return [::Boolean]
  #     Optional. Whether each value needs to be strictly greater than ('>') the
  #     minimum, or if equality is allowed.
  #
  #     Only relevant if a `min_value` has been defined. Default = false.
  # @!attribute [rw] strict_max_enabled
  #   @return [::Boolean]
  #     Optional. Whether each value needs to be strictly lesser than ('<') the
  #     maximum, or if equality is allowed.
  #
  #     Only relevant if a `max_value` has been defined. Default = false.
  class RangeExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value is null.
  class NonNullExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value is contained by a specified set.
  # @!attribute [rw] values
  #   @return [::Array<::String>]
  #     Optional. Expected values for the column value.
  class SetExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value matches a specified regex.
  # @!attribute [rw] regex
  #   @return [::String]
  #     Optional. A regular expression the column value is expected to match.
  class RegexExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the column has duplicates.
  class UniquenessExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the column aggregate statistic lies between a specified
  # range.
  # @!attribute [rw] statistic
  #   @return [::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation::ColumnStatistic]
  #     Optional. The aggregate metric to evaluate.
  # @!attribute [rw] min_value
  #   @return [::String]
  #     Optional. The minimum column statistic value allowed for a row to pass
  #     this validation.
  #
  #     At least one of `min_value` and `max_value` need to be provided.
  # @!attribute [rw] max_value
  #   @return [::String]
  #     Optional. The maximum column statistic value allowed for a row to pass
  #     this validation.
  #
  #     At least one of `min_value` and `max_value` need to be provided.
  # @!attribute [rw] strict_min_enabled
  #   @return [::Boolean]
  #     Optional. Whether column statistic needs to be strictly greater than
  #     ('>') the minimum, or if equality is allowed.
  #
  #     Only relevant if a `min_value` has been defined. Default = false.
  # @!attribute [rw] strict_max_enabled
  #   @return [::Boolean]
  #     Optional. Whether column statistic needs to be strictly lesser than ('<')
  #     the maximum, or if equality is allowed.
  #
  #     Only relevant if a `max_value` has been defined. Default = false.
  class StatisticRangeExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The list of aggregate metrics a rule can be evaluated against.
    module ColumnStatistic
      # Unspecified statistic type
      STATISTIC_UNDEFINED = 0

      # Evaluate the column mean
      MEAN = 1

      # Evaluate the column min
      MIN = 2

      # Evaluate the column max
      MAX = 3
    end
  end

  # Evaluates whether each row passes the specified condition.
  #
  # The SQL expression needs to use BigQuery standard SQL syntax and should
  # produce a boolean value per row as the result.
  #
  # Example: col1 >= 0 AND col2 < 10
  # @!attribute [rw] sql_expression
  #   @return [::String]
  #     Optional. The SQL expression.
  class RowConditionExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the provided expression is true.
  #
  # The SQL expression needs to use BigQuery standard SQL syntax and should
  # produce a scalar boolean result.
  #
  # Example: MIN(col1) >= 0
  # @!attribute [rw] sql_expression
  #   @return [::String]
  #     Optional. The SQL expression.
  class TableConditionExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A SQL statement that is evaluated to return rows that match an invalid
  # state. If any rows are are returned, this rule fails.
  #
  # The SQL statement must use BigQuery standard SQL syntax, and must not
  # contain any semicolons.
  #
  # You can use the data reference parameter `${data()}` to reference the
  # source table with all of its precondition filters applied. Examples of
  # precondition filters include row filters, incremental data filters, and
  # sampling. For more information, see [Data reference
  # parameter](https://cloud.google.com/dataplex/docs/auto-data-quality-overview#data-reference-parameter).
  #
  # Example: `SELECT * FROM ${data()} WHERE price < 0`
  # @!attribute [rw] sql_statement
  #   @return [::String]
  #     Optional. The SQL statement.
  class SqlAssertion
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#sql_assertion::Google::Cloud::Dataplex::V1::DataQualityRule::SqlAssertion

Returns Aggregate rule which evaluates the number of rows returned for the provided statement. If any rows are returned, this rule fails.

Returns:



362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
# File 'proto_docs/google/cloud/dataplex/v1/data_quality.rb', line 362

class DataQualityRule
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Evaluates whether each column value lies between a specified range.
  # @!attribute [rw] min_value
  #   @return [::String]
  #     Optional. The minimum column value allowed for a row to pass this
  #     validation. At least one of `min_value` and `max_value` need to be
  #     provided.
  # @!attribute [rw] max_value
  #   @return [::String]
  #     Optional. The maximum column value allowed for a row to pass this
  #     validation. At least one of `min_value` and `max_value` need to be
  #     provided.
  # @!attribute [rw] strict_min_enabled
  #   @return [::Boolean]
  #     Optional. Whether each value needs to be strictly greater than ('>') the
  #     minimum, or if equality is allowed.
  #
  #     Only relevant if a `min_value` has been defined. Default = false.
  # @!attribute [rw] strict_max_enabled
  #   @return [::Boolean]
  #     Optional. Whether each value needs to be strictly lesser than ('<') the
  #     maximum, or if equality is allowed.
  #
  #     Only relevant if a `max_value` has been defined. Default = false.
  class RangeExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value is null.
  class NonNullExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value is contained by a specified set.
  # @!attribute [rw] values
  #   @return [::Array<::String>]
  #     Optional. Expected values for the column value.
  class SetExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value matches a specified regex.
  # @!attribute [rw] regex
  #   @return [::String]
  #     Optional. A regular expression the column value is expected to match.
  class RegexExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the column has duplicates.
  class UniquenessExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the column aggregate statistic lies between a specified
  # range.
  # @!attribute [rw] statistic
  #   @return [::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation::ColumnStatistic]
  #     Optional. The aggregate metric to evaluate.
  # @!attribute [rw] min_value
  #   @return [::String]
  #     Optional. The minimum column statistic value allowed for a row to pass
  #     this validation.
  #
  #     At least one of `min_value` and `max_value` need to be provided.
  # @!attribute [rw] max_value
  #   @return [::String]
  #     Optional. The maximum column statistic value allowed for a row to pass
  #     this validation.
  #
  #     At least one of `min_value` and `max_value` need to be provided.
  # @!attribute [rw] strict_min_enabled
  #   @return [::Boolean]
  #     Optional. Whether column statistic needs to be strictly greater than
  #     ('>') the minimum, or if equality is allowed.
  #
  #     Only relevant if a `min_value` has been defined. Default = false.
  # @!attribute [rw] strict_max_enabled
  #   @return [::Boolean]
  #     Optional. Whether column statistic needs to be strictly lesser than ('<')
  #     the maximum, or if equality is allowed.
  #
  #     Only relevant if a `max_value` has been defined. Default = false.
  class StatisticRangeExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The list of aggregate metrics a rule can be evaluated against.
    module ColumnStatistic
      # Unspecified statistic type
      STATISTIC_UNDEFINED = 0

      # Evaluate the column mean
      MEAN = 1

      # Evaluate the column min
      MIN = 2

      # Evaluate the column max
      MAX = 3
    end
  end

  # Evaluates whether each row passes the specified condition.
  #
  # The SQL expression needs to use BigQuery standard SQL syntax and should
  # produce a boolean value per row as the result.
  #
  # Example: col1 >= 0 AND col2 < 10
  # @!attribute [rw] sql_expression
  #   @return [::String]
  #     Optional. The SQL expression.
  class RowConditionExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the provided expression is true.
  #
  # The SQL expression needs to use BigQuery standard SQL syntax and should
  # produce a scalar boolean result.
  #
  # Example: MIN(col1) >= 0
  # @!attribute [rw] sql_expression
  #   @return [::String]
  #     Optional. The SQL expression.
  class TableConditionExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A SQL statement that is evaluated to return rows that match an invalid
  # state. If any rows are are returned, this rule fails.
  #
  # The SQL statement must use BigQuery standard SQL syntax, and must not
  # contain any semicolons.
  #
  # You can use the data reference parameter `${data()}` to reference the
  # source table with all of its precondition filters applied. Examples of
  # precondition filters include row filters, incremental data filters, and
  # sampling. For more information, see [Data reference
  # parameter](https://cloud.google.com/dataplex/docs/auto-data-quality-overview#data-reference-parameter).
  #
  # Example: `SELECT * FROM ${data()} WHERE price < 0`
  # @!attribute [rw] sql_statement
  #   @return [::String]
  #     Optional. The SQL statement.
  class SqlAssertion
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#statistic_range_expectation::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation

Returns Aggregate rule which evaluates whether the column aggregate statistic lies between a specified range.

Returns:



362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
# File 'proto_docs/google/cloud/dataplex/v1/data_quality.rb', line 362

class DataQualityRule
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Evaluates whether each column value lies between a specified range.
  # @!attribute [rw] min_value
  #   @return [::String]
  #     Optional. The minimum column value allowed for a row to pass this
  #     validation. At least one of `min_value` and `max_value` need to be
  #     provided.
  # @!attribute [rw] max_value
  #   @return [::String]
  #     Optional. The maximum column value allowed for a row to pass this
  #     validation. At least one of `min_value` and `max_value` need to be
  #     provided.
  # @!attribute [rw] strict_min_enabled
  #   @return [::Boolean]
  #     Optional. Whether each value needs to be strictly greater than ('>') the
  #     minimum, or if equality is allowed.
  #
  #     Only relevant if a `min_value` has been defined. Default = false.
  # @!attribute [rw] strict_max_enabled
  #   @return [::Boolean]
  #     Optional. Whether each value needs to be strictly lesser than ('<') the
  #     maximum, or if equality is allowed.
  #
  #     Only relevant if a `max_value` has been defined. Default = false.
  class RangeExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value is null.
  class NonNullExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value is contained by a specified set.
  # @!attribute [rw] values
  #   @return [::Array<::String>]
  #     Optional. Expected values for the column value.
  class SetExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value matches a specified regex.
  # @!attribute [rw] regex
  #   @return [::String]
  #     Optional. A regular expression the column value is expected to match.
  class RegexExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the column has duplicates.
  class UniquenessExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the column aggregate statistic lies between a specified
  # range.
  # @!attribute [rw] statistic
  #   @return [::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation::ColumnStatistic]
  #     Optional. The aggregate metric to evaluate.
  # @!attribute [rw] min_value
  #   @return [::String]
  #     Optional. The minimum column statistic value allowed for a row to pass
  #     this validation.
  #
  #     At least one of `min_value` and `max_value` need to be provided.
  # @!attribute [rw] max_value
  #   @return [::String]
  #     Optional. The maximum column statistic value allowed for a row to pass
  #     this validation.
  #
  #     At least one of `min_value` and `max_value` need to be provided.
  # @!attribute [rw] strict_min_enabled
  #   @return [::Boolean]
  #     Optional. Whether column statistic needs to be strictly greater than
  #     ('>') the minimum, or if equality is allowed.
  #
  #     Only relevant if a `min_value` has been defined. Default = false.
  # @!attribute [rw] strict_max_enabled
  #   @return [::Boolean]
  #     Optional. Whether column statistic needs to be strictly lesser than ('<')
  #     the maximum, or if equality is allowed.
  #
  #     Only relevant if a `max_value` has been defined. Default = false.
  class StatisticRangeExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The list of aggregate metrics a rule can be evaluated against.
    module ColumnStatistic
      # Unspecified statistic type
      STATISTIC_UNDEFINED = 0

      # Evaluate the column mean
      MEAN = 1

      # Evaluate the column min
      MIN = 2

      # Evaluate the column max
      MAX = 3
    end
  end

  # Evaluates whether each row passes the specified condition.
  #
  # The SQL expression needs to use BigQuery standard SQL syntax and should
  # produce a boolean value per row as the result.
  #
  # Example: col1 >= 0 AND col2 < 10
  # @!attribute [rw] sql_expression
  #   @return [::String]
  #     Optional. The SQL expression.
  class RowConditionExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the provided expression is true.
  #
  # The SQL expression needs to use BigQuery standard SQL syntax and should
  # produce a scalar boolean result.
  #
  # Example: MIN(col1) >= 0
  # @!attribute [rw] sql_expression
  #   @return [::String]
  #     Optional. The SQL expression.
  class TableConditionExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A SQL statement that is evaluated to return rows that match an invalid
  # state. If any rows are are returned, this rule fails.
  #
  # The SQL statement must use BigQuery standard SQL syntax, and must not
  # contain any semicolons.
  #
  # You can use the data reference parameter `${data()}` to reference the
  # source table with all of its precondition filters applied. Examples of
  # precondition filters include row filters, incremental data filters, and
  # sampling. For more information, see [Data reference
  # parameter](https://cloud.google.com/dataplex/docs/auto-data-quality-overview#data-reference-parameter).
  #
  # Example: `SELECT * FROM ${data()} WHERE price < 0`
  # @!attribute [rw] sql_statement
  #   @return [::String]
  #     Optional. The SQL statement.
  class SqlAssertion
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#table_condition_expectation::Google::Cloud::Dataplex::V1::DataQualityRule::TableConditionExpectation

Returns Aggregate rule which evaluates whether the provided expression is true for a table.

Returns:



362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
# File 'proto_docs/google/cloud/dataplex/v1/data_quality.rb', line 362

class DataQualityRule
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Evaluates whether each column value lies between a specified range.
  # @!attribute [rw] min_value
  #   @return [::String]
  #     Optional. The minimum column value allowed for a row to pass this
  #     validation. At least one of `min_value` and `max_value` need to be
  #     provided.
  # @!attribute [rw] max_value
  #   @return [::String]
  #     Optional. The maximum column value allowed for a row to pass this
  #     validation. At least one of `min_value` and `max_value` need to be
  #     provided.
  # @!attribute [rw] strict_min_enabled
  #   @return [::Boolean]
  #     Optional. Whether each value needs to be strictly greater than ('>') the
  #     minimum, or if equality is allowed.
  #
  #     Only relevant if a `min_value` has been defined. Default = false.
  # @!attribute [rw] strict_max_enabled
  #   @return [::Boolean]
  #     Optional. Whether each value needs to be strictly lesser than ('<') the
  #     maximum, or if equality is allowed.
  #
  #     Only relevant if a `max_value` has been defined. Default = false.
  class RangeExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value is null.
  class NonNullExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value is contained by a specified set.
  # @!attribute [rw] values
  #   @return [::Array<::String>]
  #     Optional. Expected values for the column value.
  class SetExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value matches a specified regex.
  # @!attribute [rw] regex
  #   @return [::String]
  #     Optional. A regular expression the column value is expected to match.
  class RegexExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the column has duplicates.
  class UniquenessExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the column aggregate statistic lies between a specified
  # range.
  # @!attribute [rw] statistic
  #   @return [::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation::ColumnStatistic]
  #     Optional. The aggregate metric to evaluate.
  # @!attribute [rw] min_value
  #   @return [::String]
  #     Optional. The minimum column statistic value allowed for a row to pass
  #     this validation.
  #
  #     At least one of `min_value` and `max_value` need to be provided.
  # @!attribute [rw] max_value
  #   @return [::String]
  #     Optional. The maximum column statistic value allowed for a row to pass
  #     this validation.
  #
  #     At least one of `min_value` and `max_value` need to be provided.
  # @!attribute [rw] strict_min_enabled
  #   @return [::Boolean]
  #     Optional. Whether column statistic needs to be strictly greater than
  #     ('>') the minimum, or if equality is allowed.
  #
  #     Only relevant if a `min_value` has been defined. Default = false.
  # @!attribute [rw] strict_max_enabled
  #   @return [::Boolean]
  #     Optional. Whether column statistic needs to be strictly lesser than ('<')
  #     the maximum, or if equality is allowed.
  #
  #     Only relevant if a `max_value` has been defined. Default = false.
  class StatisticRangeExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The list of aggregate metrics a rule can be evaluated against.
    module ColumnStatistic
      # Unspecified statistic type
      STATISTIC_UNDEFINED = 0

      # Evaluate the column mean
      MEAN = 1

      # Evaluate the column min
      MIN = 2

      # Evaluate the column max
      MAX = 3
    end
  end

  # Evaluates whether each row passes the specified condition.
  #
  # The SQL expression needs to use BigQuery standard SQL syntax and should
  # produce a boolean value per row as the result.
  #
  # Example: col1 >= 0 AND col2 < 10
  # @!attribute [rw] sql_expression
  #   @return [::String]
  #     Optional. The SQL expression.
  class RowConditionExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the provided expression is true.
  #
  # The SQL expression needs to use BigQuery standard SQL syntax and should
  # produce a scalar boolean result.
  #
  # Example: MIN(col1) >= 0
  # @!attribute [rw] sql_expression
  #   @return [::String]
  #     Optional. The SQL expression.
  class TableConditionExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A SQL statement that is evaluated to return rows that match an invalid
  # state. If any rows are are returned, this rule fails.
  #
  # The SQL statement must use BigQuery standard SQL syntax, and must not
  # contain any semicolons.
  #
  # You can use the data reference parameter `${data()}` to reference the
  # source table with all of its precondition filters applied. Examples of
  # precondition filters include row filters, incremental data filters, and
  # sampling. For more information, see [Data reference
  # parameter](https://cloud.google.com/dataplex/docs/auto-data-quality-overview#data-reference-parameter).
  #
  # Example: `SELECT * FROM ${data()} WHERE price < 0`
  # @!attribute [rw] sql_statement
  #   @return [::String]
  #     Optional. The SQL statement.
  class SqlAssertion
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#threshold::Float

Returns Optional. The minimum ratio of passing_rows / total_rows required to pass this rule, with a range of [0.0, 1.0].

0 indicates default value (i.e. 1.0).

This field is only valid for row-level type rules.

Returns:

  • (::Float)

    Optional. The minimum ratio of passing_rows / total_rows required to pass this rule, with a range of [0.0, 1.0].

    0 indicates default value (i.e. 1.0).

    This field is only valid for row-level type rules.



362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
# File 'proto_docs/google/cloud/dataplex/v1/data_quality.rb', line 362

class DataQualityRule
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Evaluates whether each column value lies between a specified range.
  # @!attribute [rw] min_value
  #   @return [::String]
  #     Optional. The minimum column value allowed for a row to pass this
  #     validation. At least one of `min_value` and `max_value` need to be
  #     provided.
  # @!attribute [rw] max_value
  #   @return [::String]
  #     Optional. The maximum column value allowed for a row to pass this
  #     validation. At least one of `min_value` and `max_value` need to be
  #     provided.
  # @!attribute [rw] strict_min_enabled
  #   @return [::Boolean]
  #     Optional. Whether each value needs to be strictly greater than ('>') the
  #     minimum, or if equality is allowed.
  #
  #     Only relevant if a `min_value` has been defined. Default = false.
  # @!attribute [rw] strict_max_enabled
  #   @return [::Boolean]
  #     Optional. Whether each value needs to be strictly lesser than ('<') the
  #     maximum, or if equality is allowed.
  #
  #     Only relevant if a `max_value` has been defined. Default = false.
  class RangeExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value is null.
  class NonNullExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value is contained by a specified set.
  # @!attribute [rw] values
  #   @return [::Array<::String>]
  #     Optional. Expected values for the column value.
  class SetExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value matches a specified regex.
  # @!attribute [rw] regex
  #   @return [::String]
  #     Optional. A regular expression the column value is expected to match.
  class RegexExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the column has duplicates.
  class UniquenessExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the column aggregate statistic lies between a specified
  # range.
  # @!attribute [rw] statistic
  #   @return [::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation::ColumnStatistic]
  #     Optional. The aggregate metric to evaluate.
  # @!attribute [rw] min_value
  #   @return [::String]
  #     Optional. The minimum column statistic value allowed for a row to pass
  #     this validation.
  #
  #     At least one of `min_value` and `max_value` need to be provided.
  # @!attribute [rw] max_value
  #   @return [::String]
  #     Optional. The maximum column statistic value allowed for a row to pass
  #     this validation.
  #
  #     At least one of `min_value` and `max_value` need to be provided.
  # @!attribute [rw] strict_min_enabled
  #   @return [::Boolean]
  #     Optional. Whether column statistic needs to be strictly greater than
  #     ('>') the minimum, or if equality is allowed.
  #
  #     Only relevant if a `min_value` has been defined. Default = false.
  # @!attribute [rw] strict_max_enabled
  #   @return [::Boolean]
  #     Optional. Whether column statistic needs to be strictly lesser than ('<')
  #     the maximum, or if equality is allowed.
  #
  #     Only relevant if a `max_value` has been defined. Default = false.
  class StatisticRangeExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The list of aggregate metrics a rule can be evaluated against.
    module ColumnStatistic
      # Unspecified statistic type
      STATISTIC_UNDEFINED = 0

      # Evaluate the column mean
      MEAN = 1

      # Evaluate the column min
      MIN = 2

      # Evaluate the column max
      MAX = 3
    end
  end

  # Evaluates whether each row passes the specified condition.
  #
  # The SQL expression needs to use BigQuery standard SQL syntax and should
  # produce a boolean value per row as the result.
  #
  # Example: col1 >= 0 AND col2 < 10
  # @!attribute [rw] sql_expression
  #   @return [::String]
  #     Optional. The SQL expression.
  class RowConditionExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the provided expression is true.
  #
  # The SQL expression needs to use BigQuery standard SQL syntax and should
  # produce a scalar boolean result.
  #
  # Example: MIN(col1) >= 0
  # @!attribute [rw] sql_expression
  #   @return [::String]
  #     Optional. The SQL expression.
  class TableConditionExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A SQL statement that is evaluated to return rows that match an invalid
  # state. If any rows are are returned, this rule fails.
  #
  # The SQL statement must use BigQuery standard SQL syntax, and must not
  # contain any semicolons.
  #
  # You can use the data reference parameter `${data()}` to reference the
  # source table with all of its precondition filters applied. Examples of
  # precondition filters include row filters, incremental data filters, and
  # sampling. For more information, see [Data reference
  # parameter](https://cloud.google.com/dataplex/docs/auto-data-quality-overview#data-reference-parameter).
  #
  # Example: `SELECT * FROM ${data()} WHERE price < 0`
  # @!attribute [rw] sql_statement
  #   @return [::String]
  #     Optional. The SQL statement.
  class SqlAssertion
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#uniqueness_expectation::Google::Cloud::Dataplex::V1::DataQualityRule::UniquenessExpectation

Returns Row-level rule which evaluates whether each column value is unique.

Returns:



362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
# File 'proto_docs/google/cloud/dataplex/v1/data_quality.rb', line 362

class DataQualityRule
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Evaluates whether each column value lies between a specified range.
  # @!attribute [rw] min_value
  #   @return [::String]
  #     Optional. The minimum column value allowed for a row to pass this
  #     validation. At least one of `min_value` and `max_value` need to be
  #     provided.
  # @!attribute [rw] max_value
  #   @return [::String]
  #     Optional. The maximum column value allowed for a row to pass this
  #     validation. At least one of `min_value` and `max_value` need to be
  #     provided.
  # @!attribute [rw] strict_min_enabled
  #   @return [::Boolean]
  #     Optional. Whether each value needs to be strictly greater than ('>') the
  #     minimum, or if equality is allowed.
  #
  #     Only relevant if a `min_value` has been defined. Default = false.
  # @!attribute [rw] strict_max_enabled
  #   @return [::Boolean]
  #     Optional. Whether each value needs to be strictly lesser than ('<') the
  #     maximum, or if equality is allowed.
  #
  #     Only relevant if a `max_value` has been defined. Default = false.
  class RangeExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value is null.
  class NonNullExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value is contained by a specified set.
  # @!attribute [rw] values
  #   @return [::Array<::String>]
  #     Optional. Expected values for the column value.
  class SetExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether each column value matches a specified regex.
  # @!attribute [rw] regex
  #   @return [::String]
  #     Optional. A regular expression the column value is expected to match.
  class RegexExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the column has duplicates.
  class UniquenessExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the column aggregate statistic lies between a specified
  # range.
  # @!attribute [rw] statistic
  #   @return [::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation::ColumnStatistic]
  #     Optional. The aggregate metric to evaluate.
  # @!attribute [rw] min_value
  #   @return [::String]
  #     Optional. The minimum column statistic value allowed for a row to pass
  #     this validation.
  #
  #     At least one of `min_value` and `max_value` need to be provided.
  # @!attribute [rw] max_value
  #   @return [::String]
  #     Optional. The maximum column statistic value allowed for a row to pass
  #     this validation.
  #
  #     At least one of `min_value` and `max_value` need to be provided.
  # @!attribute [rw] strict_min_enabled
  #   @return [::Boolean]
  #     Optional. Whether column statistic needs to be strictly greater than
  #     ('>') the minimum, or if equality is allowed.
  #
  #     Only relevant if a `min_value` has been defined. Default = false.
  # @!attribute [rw] strict_max_enabled
  #   @return [::Boolean]
  #     Optional. Whether column statistic needs to be strictly lesser than ('<')
  #     the maximum, or if equality is allowed.
  #
  #     Only relevant if a `max_value` has been defined. Default = false.
  class StatisticRangeExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The list of aggregate metrics a rule can be evaluated against.
    module ColumnStatistic
      # Unspecified statistic type
      STATISTIC_UNDEFINED = 0

      # Evaluate the column mean
      MEAN = 1

      # Evaluate the column min
      MIN = 2

      # Evaluate the column max
      MAX = 3
    end
  end

  # Evaluates whether each row passes the specified condition.
  #
  # The SQL expression needs to use BigQuery standard SQL syntax and should
  # produce a boolean value per row as the result.
  #
  # Example: col1 >= 0 AND col2 < 10
  # @!attribute [rw] sql_expression
  #   @return [::String]
  #     Optional. The SQL expression.
  class RowConditionExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Evaluates whether the provided expression is true.
  #
  # The SQL expression needs to use BigQuery standard SQL syntax and should
  # produce a scalar boolean result.
  #
  # Example: MIN(col1) >= 0
  # @!attribute [rw] sql_expression
  #   @return [::String]
  #     Optional. The SQL expression.
  class TableConditionExpectation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A SQL statement that is evaluated to return rows that match an invalid
  # state. If any rows are are returned, this rule fails.
  #
  # The SQL statement must use BigQuery standard SQL syntax, and must not
  # contain any semicolons.
  #
  # You can use the data reference parameter `${data()}` to reference the
  # source table with all of its precondition filters applied. Examples of
  # precondition filters include row filters, incremental data filters, and
  # sampling. For more information, see [Data reference
  # parameter](https://cloud.google.com/dataplex/docs/auto-data-quality-overview#data-reference-parameter).
  #
  # Example: `SELECT * FROM ${data()} WHERE price < 0`
  # @!attribute [rw] sql_statement
  #   @return [::String]
  #     Optional. The SQL statement.
  class SqlAssertion
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end