Class: Google::Cloud::Dataplex::V1::Schema

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

Overview

Schema information describing the structure and layout of the data.

Defined Under Namespace

Modules: Mode, PartitionStyle, Type Classes: PartitionField, SchemaField

Instance Attribute Summary collapse

Instance Attribute Details

#fields::Array<::Google::Cloud::Dataplex::V1::Schema::SchemaField>

Returns Optional. The sequence of fields describing data in table entities. Note: BigQuery SchemaFields are immutable.

Returns:



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
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
# File 'proto_docs/google/cloud/dataplex/v1/metadata.rb', line 435

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

  # Represents a column field within a table schema.
  # @!attribute [rw] name
  #   @return [::String]
  #     Required. The name of the field. Must contain only letters, numbers and
  #     underscores, with a maximum length of 767 characters,
  #     and must begin with a letter or underscore.
  # @!attribute [rw] description
  #   @return [::String]
  #     Optional. User friendly field description. Must be less than or equal to
  #     1024 characters.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::Dataplex::V1::Schema::Type]
  #     Required. The type of field.
  # @!attribute [rw] mode
  #   @return [::Google::Cloud::Dataplex::V1::Schema::Mode]
  #     Required. Additional field semantics.
  # @!attribute [rw] fields
  #   @return [::Array<::Google::Cloud::Dataplex::V1::Schema::SchemaField>]
  #     Optional. Any nested field for complex types.
  class SchemaField
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Represents a key field within the entity's partition structure. You could
  # have up to 20 partition fields, but only the first 10 partitions have the
  # filtering ability due to performance consideration. **Note:**
  # Partition fields are immutable.
  # @!attribute [rw] name
  #   @return [::String]
  #     Required. Partition field name must consist of letters, numbers, and
  #     underscores only, with a maximum of length of 256 characters, and must
  #     begin with a letter or underscore..
  # @!attribute [rw] type
  #   @return [::Google::Cloud::Dataplex::V1::Schema::Type]
  #     Required. Immutable. The type of field.
  class PartitionField
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Type information for fields in schemas and partition schemas.
  module Type
    # SchemaType unspecified.
    TYPE_UNSPECIFIED = 0

    # Boolean field.
    BOOLEAN = 1

    # Single byte numeric field.
    BYTE = 2

    # 16-bit numeric field.
    INT16 = 3

    # 32-bit numeric field.
    INT32 = 4

    # 64-bit numeric field.
    INT64 = 5

    # Floating point numeric field.
    FLOAT = 6

    # Double precision numeric field.
    DOUBLE = 7

    # Real value numeric field.
    DECIMAL = 8

    # Sequence of characters field.
    STRING = 9

    # Sequence of bytes field.
    BINARY = 10

    # Date and time field.
    TIMESTAMP = 11

    # Date field.
    DATE = 12

    # Time field.
    TIME = 13

    # Structured field. Nested fields that define the structure of the map.
    # If all nested fields are nullable, this field represents a union.
    RECORD = 14

    # Null field that does not have values.
    NULL = 100
  end

  # Additional qualifiers to define field semantics.
  module Mode
    # Mode unspecified.
    MODE_UNSPECIFIED = 0

    # The field has required semantics.
    REQUIRED = 1

    # The field has optional semantics, and may be null.
    NULLABLE = 2

    # The field has repeated (0 or more) semantics, and is a list of values.
    REPEATED = 3
  end

  # The structure of paths within the entity, which represent partitions.
  module PartitionStyle
    # PartitionStyle unspecified
    PARTITION_STYLE_UNSPECIFIED = 0

    # Partitions are hive-compatible.
    # Examples: `gs://bucket/path/to/table/dt=2019-10-31/lang=en`,
    # `gs://bucket/path/to/table/dt=2019-10-31/lang=en/late`.
    HIVE_COMPATIBLE = 1
  end
end

#partition_fields::Array<::Google::Cloud::Dataplex::V1::Schema::PartitionField>

Returns Optional. The sequence of fields describing the partition structure in entities. If this field is empty, there are no partitions within the data.

Returns:



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
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
# File 'proto_docs/google/cloud/dataplex/v1/metadata.rb', line 435

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

  # Represents a column field within a table schema.
  # @!attribute [rw] name
  #   @return [::String]
  #     Required. The name of the field. Must contain only letters, numbers and
  #     underscores, with a maximum length of 767 characters,
  #     and must begin with a letter or underscore.
  # @!attribute [rw] description
  #   @return [::String]
  #     Optional. User friendly field description. Must be less than or equal to
  #     1024 characters.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::Dataplex::V1::Schema::Type]
  #     Required. The type of field.
  # @!attribute [rw] mode
  #   @return [::Google::Cloud::Dataplex::V1::Schema::Mode]
  #     Required. Additional field semantics.
  # @!attribute [rw] fields
  #   @return [::Array<::Google::Cloud::Dataplex::V1::Schema::SchemaField>]
  #     Optional. Any nested field for complex types.
  class SchemaField
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Represents a key field within the entity's partition structure. You could
  # have up to 20 partition fields, but only the first 10 partitions have the
  # filtering ability due to performance consideration. **Note:**
  # Partition fields are immutable.
  # @!attribute [rw] name
  #   @return [::String]
  #     Required. Partition field name must consist of letters, numbers, and
  #     underscores only, with a maximum of length of 256 characters, and must
  #     begin with a letter or underscore..
  # @!attribute [rw] type
  #   @return [::Google::Cloud::Dataplex::V1::Schema::Type]
  #     Required. Immutable. The type of field.
  class PartitionField
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Type information for fields in schemas and partition schemas.
  module Type
    # SchemaType unspecified.
    TYPE_UNSPECIFIED = 0

    # Boolean field.
    BOOLEAN = 1

    # Single byte numeric field.
    BYTE = 2

    # 16-bit numeric field.
    INT16 = 3

    # 32-bit numeric field.
    INT32 = 4

    # 64-bit numeric field.
    INT64 = 5

    # Floating point numeric field.
    FLOAT = 6

    # Double precision numeric field.
    DOUBLE = 7

    # Real value numeric field.
    DECIMAL = 8

    # Sequence of characters field.
    STRING = 9

    # Sequence of bytes field.
    BINARY = 10

    # Date and time field.
    TIMESTAMP = 11

    # Date field.
    DATE = 12

    # Time field.
    TIME = 13

    # Structured field. Nested fields that define the structure of the map.
    # If all nested fields are nullable, this field represents a union.
    RECORD = 14

    # Null field that does not have values.
    NULL = 100
  end

  # Additional qualifiers to define field semantics.
  module Mode
    # Mode unspecified.
    MODE_UNSPECIFIED = 0

    # The field has required semantics.
    REQUIRED = 1

    # The field has optional semantics, and may be null.
    NULLABLE = 2

    # The field has repeated (0 or more) semantics, and is a list of values.
    REPEATED = 3
  end

  # The structure of paths within the entity, which represent partitions.
  module PartitionStyle
    # PartitionStyle unspecified
    PARTITION_STYLE_UNSPECIFIED = 0

    # Partitions are hive-compatible.
    # Examples: `gs://bucket/path/to/table/dt=2019-10-31/lang=en`,
    # `gs://bucket/path/to/table/dt=2019-10-31/lang=en/late`.
    HIVE_COMPATIBLE = 1
  end
end

#partition_style::Google::Cloud::Dataplex::V1::Schema::PartitionStyle

Returns Optional. The structure of paths containing partition data within the entity.

Returns:



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
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
# File 'proto_docs/google/cloud/dataplex/v1/metadata.rb', line 435

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

  # Represents a column field within a table schema.
  # @!attribute [rw] name
  #   @return [::String]
  #     Required. The name of the field. Must contain only letters, numbers and
  #     underscores, with a maximum length of 767 characters,
  #     and must begin with a letter or underscore.
  # @!attribute [rw] description
  #   @return [::String]
  #     Optional. User friendly field description. Must be less than or equal to
  #     1024 characters.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::Dataplex::V1::Schema::Type]
  #     Required. The type of field.
  # @!attribute [rw] mode
  #   @return [::Google::Cloud::Dataplex::V1::Schema::Mode]
  #     Required. Additional field semantics.
  # @!attribute [rw] fields
  #   @return [::Array<::Google::Cloud::Dataplex::V1::Schema::SchemaField>]
  #     Optional. Any nested field for complex types.
  class SchemaField
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Represents a key field within the entity's partition structure. You could
  # have up to 20 partition fields, but only the first 10 partitions have the
  # filtering ability due to performance consideration. **Note:**
  # Partition fields are immutable.
  # @!attribute [rw] name
  #   @return [::String]
  #     Required. Partition field name must consist of letters, numbers, and
  #     underscores only, with a maximum of length of 256 characters, and must
  #     begin with a letter or underscore..
  # @!attribute [rw] type
  #   @return [::Google::Cloud::Dataplex::V1::Schema::Type]
  #     Required. Immutable. The type of field.
  class PartitionField
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Type information for fields in schemas and partition schemas.
  module Type
    # SchemaType unspecified.
    TYPE_UNSPECIFIED = 0

    # Boolean field.
    BOOLEAN = 1

    # Single byte numeric field.
    BYTE = 2

    # 16-bit numeric field.
    INT16 = 3

    # 32-bit numeric field.
    INT32 = 4

    # 64-bit numeric field.
    INT64 = 5

    # Floating point numeric field.
    FLOAT = 6

    # Double precision numeric field.
    DOUBLE = 7

    # Real value numeric field.
    DECIMAL = 8

    # Sequence of characters field.
    STRING = 9

    # Sequence of bytes field.
    BINARY = 10

    # Date and time field.
    TIMESTAMP = 11

    # Date field.
    DATE = 12

    # Time field.
    TIME = 13

    # Structured field. Nested fields that define the structure of the map.
    # If all nested fields are nullable, this field represents a union.
    RECORD = 14

    # Null field that does not have values.
    NULL = 100
  end

  # Additional qualifiers to define field semantics.
  module Mode
    # Mode unspecified.
    MODE_UNSPECIFIED = 0

    # The field has required semantics.
    REQUIRED = 1

    # The field has optional semantics, and may be null.
    NULLABLE = 2

    # The field has repeated (0 or more) semantics, and is a list of values.
    REPEATED = 3
  end

  # The structure of paths within the entity, which represent partitions.
  module PartitionStyle
    # PartitionStyle unspecified
    PARTITION_STYLE_UNSPECIFIED = 0

    # Partitions are hive-compatible.
    # Examples: `gs://bucket/path/to/table/dt=2019-10-31/lang=en`,
    # `gs://bucket/path/to/table/dt=2019-10-31/lang=en/late`.
    HIVE_COMPATIBLE = 1
  end
end

#user_managed::Boolean

Returns Required. Set to true if user-managed or false if managed by Dataplex. The default is false (managed by Dataplex).

  • Set to falseto enable Dataplex discovery to update the schema. including new data discovery, schema inference, and schema evolution. Users retain the ability to input and edit the schema. Dataplex treats schema input by the user as though produced by a previous Dataplex discovery operation, and it will evolve the schema and take action based on that treatment.

  • Set to true to fully manage the entity schema. This setting guarantees that Dataplex will not change schema fields.

Returns:

  • (::Boolean)

    Required. Set to true if user-managed or false if managed by Dataplex. The default is false (managed by Dataplex).

    • Set to falseto enable Dataplex discovery to update the schema. including new data discovery, schema inference, and schema evolution. Users retain the ability to input and edit the schema. Dataplex treats schema input by the user as though produced by a previous Dataplex discovery operation, and it will evolve the schema and take action based on that treatment.

    • Set to true to fully manage the entity schema. This setting guarantees that Dataplex will not change schema fields.



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
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
# File 'proto_docs/google/cloud/dataplex/v1/metadata.rb', line 435

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

  # Represents a column field within a table schema.
  # @!attribute [rw] name
  #   @return [::String]
  #     Required. The name of the field. Must contain only letters, numbers and
  #     underscores, with a maximum length of 767 characters,
  #     and must begin with a letter or underscore.
  # @!attribute [rw] description
  #   @return [::String]
  #     Optional. User friendly field description. Must be less than or equal to
  #     1024 characters.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::Dataplex::V1::Schema::Type]
  #     Required. The type of field.
  # @!attribute [rw] mode
  #   @return [::Google::Cloud::Dataplex::V1::Schema::Mode]
  #     Required. Additional field semantics.
  # @!attribute [rw] fields
  #   @return [::Array<::Google::Cloud::Dataplex::V1::Schema::SchemaField>]
  #     Optional. Any nested field for complex types.
  class SchemaField
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Represents a key field within the entity's partition structure. You could
  # have up to 20 partition fields, but only the first 10 partitions have the
  # filtering ability due to performance consideration. **Note:**
  # Partition fields are immutable.
  # @!attribute [rw] name
  #   @return [::String]
  #     Required. Partition field name must consist of letters, numbers, and
  #     underscores only, with a maximum of length of 256 characters, and must
  #     begin with a letter or underscore..
  # @!attribute [rw] type
  #   @return [::Google::Cloud::Dataplex::V1::Schema::Type]
  #     Required. Immutable. The type of field.
  class PartitionField
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Type information for fields in schemas and partition schemas.
  module Type
    # SchemaType unspecified.
    TYPE_UNSPECIFIED = 0

    # Boolean field.
    BOOLEAN = 1

    # Single byte numeric field.
    BYTE = 2

    # 16-bit numeric field.
    INT16 = 3

    # 32-bit numeric field.
    INT32 = 4

    # 64-bit numeric field.
    INT64 = 5

    # Floating point numeric field.
    FLOAT = 6

    # Double precision numeric field.
    DOUBLE = 7

    # Real value numeric field.
    DECIMAL = 8

    # Sequence of characters field.
    STRING = 9

    # Sequence of bytes field.
    BINARY = 10

    # Date and time field.
    TIMESTAMP = 11

    # Date field.
    DATE = 12

    # Time field.
    TIME = 13

    # Structured field. Nested fields that define the structure of the map.
    # If all nested fields are nullable, this field represents a union.
    RECORD = 14

    # Null field that does not have values.
    NULL = 100
  end

  # Additional qualifiers to define field semantics.
  module Mode
    # Mode unspecified.
    MODE_UNSPECIFIED = 0

    # The field has required semantics.
    REQUIRED = 1

    # The field has optional semantics, and may be null.
    NULLABLE = 2

    # The field has repeated (0 or more) semantics, and is a list of values.
    REPEATED = 3
  end

  # The structure of paths within the entity, which represent partitions.
  module PartitionStyle
    # PartitionStyle unspecified
    PARTITION_STYLE_UNSPECIFIED = 0

    # Partitions are hive-compatible.
    # Examples: `gs://bucket/path/to/table/dt=2019-10-31/lang=en`,
    # `gs://bucket/path/to/table/dt=2019-10-31/lang=en/late`.
    HIVE_COMPATIBLE = 1
  end
end