pub struct Metadata {
pub id: String,
pub name: Option<String>,
pub description: Option<String>,
pub format: Format,
pub schema_string: String,
pub partition_columns: Vec<String>,
pub created_time: Option<i64>,
pub configuration: HashMap<String, Option<String>>,
}
Expand description
Defines a metadata action
Fields§
§id: String
Unique identifier for this table
name: Option<String>
User-provided identifier for this table
description: Option<String>
User-provided description for this table
format: Format
Specification of the encoding for the files stored in the table
schema_string: String
Schema of the table
partition_columns: Vec<String>
Column names by which the data should be partitioned
created_time: Option<i64>
The time when this metadata action is created, in milliseconds since the Unix epoch
configuration: HashMap<String, Option<String>>
Configuration options for the metadata action
Implementations§
Source§impl Metadata
impl Metadata
Sourcepub fn try_new(
schema: StructType,
partition_columns: impl IntoIterator<Item = impl Into<String>>,
configuration: HashMap<String, Option<String>>,
) -> DeltaResult<Self>
pub fn try_new( schema: StructType, partition_columns: impl IntoIterator<Item = impl Into<String>>, configuration: HashMap<String, Option<String>>, ) -> DeltaResult<Self>
Create a new metadata action
Sourcepub fn with_name(self, name: impl Into<String>) -> Self
pub fn with_name(self, name: impl Into<String>) -> Self
set the table name in the metadata action
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
set the table description in the metadata action
Sourcepub fn with_created_time(self, created_time: i64) -> Self
pub fn with_created_time(self, created_time: i64) -> Self
set the table creation time in the metadata action
Sourcepub fn schema(&self) -> DeltaResult<StructType>
pub fn schema(&self) -> DeltaResult<StructType>
get the table schema
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Metadata
impl<'de> Deserialize<'de> for Metadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Metadata
impl StructuralPartialEq for Metadata
Auto Trait Implementations§
impl Freeze for Metadata
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnwindSafe for Metadata
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more