Skip to content

FileAction

FileAction is an extension of the Action abstraction for data file-related actions.

Contract

dataChange

dataChange: Boolean

Controls the transaction isolation level for committing a transaction

Isolation Level Description
SnapshotIsolation No data changes (dataChange is false for all FileActions to be committed)
Serializable  

There can be no RemoveFiles with dataChange enabled for appendOnly unmodifiable tables (or an UnsupportedOperationException is thrown).

dataChange Value When
false InMemoryLogReplay is requested to replay a version
true ConvertToDeltaCommand is executed (and requested to create an AddFile with the flag turned on)
Opposite of dataChange option WriteIntoDelta is requested to write (with dataChange option turned off for rearrange-only writes)

dataChange is used when:

numLogicalRecords

numLogicalRecords: Option[Long]

Always None:

See:

Used when:

Partition Values

partitionValues: Map[String, String]

Partition columns to their values of this logical file

Note

partitionValues is not used.

Path

path: String

Tags

tags: Map[String, String]

Metadata about this logical file

Used to get the value of a tag

Implementations

Sealed Trait

FileAction is a Scala sealed trait which means that all of the implementations are in the same compilation unit (a single file).

Learn more in the Scala Language Specification.

Tag Value

getTag(tagName: String): Option[String]

getTag gets the value of the given tag (by tagName), if available.


getTag is used when: