Class: AWSCDK::S3Tables::CfnTable::IcebergPartitionFieldProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
s3_tables/cfn_table.rb

Overview

A partition field specification for an Iceberg table.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, source_id:, transform:, field_id: nil) ⇒ IcebergPartitionFieldProperty

Returns a new instance of IcebergPartitionFieldProperty.

Parameters:

  • name (String)

    The name of the partition field.

  • source_id (Numeric)

    The source column ID to partition on.

  • transform (String)

    The partition transform function (identity, bucket[N], truncate[N], year, month, day, hour).

  • field_id (Numeric, nil) (defaults to: nil)

    The partition field ID (auto-assigned starting from 1000 if not specified).



786
787
788
789
790
791
792
793
794
795
# File 's3_tables/cfn_table.rb', line 786

def initialize(name:, source_id:, transform:, field_id: nil)
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @source_id = source_id
  Jsii::Type.check_type(@source_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "sourceId")
  @transform = transform
  Jsii::Type.check_type(@transform, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "transform")
  @field_id = field_id
  Jsii::Type.check_type(@field_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "fieldId") unless @field_id.nil?
end

Instance Attribute Details

#field_idNumeric? (readonly)

The partition field ID (auto-assigned starting from 1000 if not specified).



816
817
818
# File 's3_tables/cfn_table.rb', line 816

def field_id
  @field_id
end

#nameString (readonly)

The name of the partition field.



801
802
803
# File 's3_tables/cfn_table.rb', line 801

def name
  @name
end

#source_idNumeric (readonly)

The source column ID to partition on.



806
807
808
# File 's3_tables/cfn_table.rb', line 806

def source_id
  @source_id
end

#transformString (readonly)

The partition transform function (identity, bucket[N], truncate[N], year, month, day, hour).



811
812
813
# File 's3_tables/cfn_table.rb', line 811

def transform
  @transform
end

Class Method Details

.jsii_propertiesObject



818
819
820
821
822
823
824
825
# File 's3_tables/cfn_table.rb', line 818

def self.jsii_properties
  {
    :name => "name",
    :source_id => "sourceId",
    :transform => "transform",
    :field_id => "fieldId",
  }
end

Instance Method Details

#to_jsiiObject



827
828
829
830
831
832
833
834
835
836
# File 's3_tables/cfn_table.rb', line 827

def to_jsii
  result = {}
  result.merge!({
    "name" => @name,
    "sourceId" => @source_id,
    "transform" => @transform,
    "fieldId" => @field_id,
  })
  result.compact
end