Interface CreateTableTransactionBuilder

All Known Implementing Classes:
CreateTableTransactionBuilderImpl

@Evolving public interface CreateTableTransactionBuilder
Builder for creating a Transaction to create a new Delta table.
Since:
3.4.0
  • Method Details

    • withTableProperties

      CreateTableTransactionBuilder withTableProperties(Map<String,String> properties)
      Set table properties for the new Delta table.

      This method can be called multiple times to add additional properties. If a property key already exists from a previous call with a different value, an IllegalArgumentException will be thrown.

      Note, user-properties (those without a '.delta' prefix) are case-sensitive. Delta-properties are case-insensitive and are normalized to their expected case before writing to the log.

      Parameters:
      properties - A map of table property names to their values.
      Throws:
      IllegalArgumentException - if any property key already exists from a previous call with a different value.
    • withDataLayoutSpec

      Set the data layout specification for the new Delta table.

      The data layout specification determines how data files are organized within the table, such as partitioning and clustering strategies.

      The default, if not specified in the builder, is unpartitioned.

      Parameters:
      spec - The data layout specification.
      See Also:
    • withMaxRetries

      CreateTableTransactionBuilder withMaxRetries(int maxRetries)
      Set the maximum number of retries to retry the commit in the case of a retryable error.
      Parameters:
      maxRetries - The maximum number of retries. Must be at least 0. Default is 200.
    • withCommitter

      CreateTableTransactionBuilder withCommitter(Committer committer)
      Provides a custom committer to use at transaction commit time.

      Catalog implementations that wish to support the catalogManaged Delta table feature should provide to engines their own catalog-specific Committer implementation which may, for example, send a commit RPC to the catalog service to finalize the commit.

      If no committer is provided, a default committer will be created that only supports writing into filesystem-managed Delta tables.

      Parameters:
      committer - the committer to use
      Returns:
      a new builder instance with the provided committer
      See Also:
    • build

      Transaction build(Engine engine)
      Build the transaction for creating the Delta table.

      This validates all the configuration and creates a Transaction that can be used to create the new Delta table. The transaction must be committed using Transaction.commit(Engine, CloseableIterable) to actually create the table.

      Parameters:
      engine - The Engine instance to use.
      Returns:
      A configured Transaction for creating the table.