Interface IcebergSchemaV2.Builder

  • Method Details

    • type

      The type of the top-level schema, which is always a struct type as defined in the Apache Iceberg specification. This value must be struct.

      Parameters:
      type - The type of the top-level schema, which is always a struct type as defined in the Apache Iceberg specification. This value must be struct.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • type

      The type of the top-level schema, which is always a struct type as defined in the Apache Iceberg specification. This value must be struct.

      Parameters:
      type - The type of the top-level schema, which is always a struct type as defined in the Apache Iceberg specification. This value must be struct.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • fields

      The schema fields for the table. Each field defines a column in the table, including its name, type, and whether it is required.

      Parameters:
      fields - The schema fields for the table. Each field defines a column in the table, including its name, type, and whether it is required.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • fields

      The schema fields for the table. Each field defines a column in the table, including its name, type, and whether it is required.

      Parameters:
      fields - The schema fields for the table. Each field defines a column in the table, including its name, type, and whether it is required.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • fields

      The schema fields for the table. Each field defines a column in the table, including its name, type, and whether it is required.

      This is a convenience method that creates an instance of the SchemaV2Field.Builder avoiding the need to create one manually via SchemaV2Field.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to fields(List<SchemaV2Field>).

      Parameters:
      fields - a consumer that will call methods on SchemaV2Field.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • schemaId

      IcebergSchemaV2.Builder schemaId(Integer schemaId)

      An optional unique identifier for the schema. Schema IDs are used by Apache Iceberg to track schema evolution.

      Parameters:
      schemaId - An optional unique identifier for the schema. Schema IDs are used by Apache Iceberg to track schema evolution.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • identifierFieldIds

      IcebergSchemaV2.Builder identifierFieldIds(Collection<Integer> identifierFieldIds)

      A list of field IDs that are used as the identifier fields for the table. Identifier fields uniquely identify a row in the table.

      Parameters:
      identifierFieldIds - A list of field IDs that are used as the identifier fields for the table. Identifier fields uniquely identify a row in the table.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • identifierFieldIds

      IcebergSchemaV2.Builder identifierFieldIds(Integer... identifierFieldIds)

      A list of field IDs that are used as the identifier fields for the table. Identifier fields uniquely identify a row in the table.

      Parameters:
      identifierFieldIds - A list of field IDs that are used as the identifier fields for the table. Identifier fields uniquely identify a row in the table.
      Returns:
      Returns a reference to this object so that method calls can be chained together.