Struct aws_sdk_glue::types::Mapping
source · #[non_exhaustive]pub struct Mapping {
pub to_key: Option<String>,
pub from_path: Option<Vec<String>>,
pub from_type: Option<String>,
pub to_type: Option<String>,
pub dropped: Option<bool>,
pub children: Option<Vec<Mapping>>,
}
Expand description
Specifies the mapping of data property keys.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.to_key: Option<String>
After the apply mapping, what the name of the column should be. Can be the same as FromPath
.
from_path: Option<Vec<String>>
The table or column to be modified.
from_type: Option<String>
The type of the data to be modified.
to_type: Option<String>
The data type that the data is to be modified to.
dropped: Option<bool>
If true, then the column is removed.
children: Option<Vec<Mapping>>
Only applicable to nested data structures. If you want to change the parent structure, but also one of its children, you can fill out this data strucutre. It is also Mapping
, but its FromPath
will be the parent's FromPath
plus the FromPath
from this structure.
For the children part, suppose you have the structure:
{ "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": \[{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }\] }
You can specify a Mapping
that looks like:
{ "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": \[{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }\] }
Implementations§
source§impl Mapping
impl Mapping
sourcepub fn to_key(&self) -> Option<&str>
pub fn to_key(&self) -> Option<&str>
After the apply mapping, what the name of the column should be. Can be the same as FromPath
.
sourcepub fn from_path(&self) -> &[String]
pub fn from_path(&self) -> &[String]
The table or column to be modified.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .from_path.is_none()
.
sourcepub fn children(&self) -> &[Mapping]
pub fn children(&self) -> &[Mapping]
Only applicable to nested data structures. If you want to change the parent structure, but also one of its children, you can fill out this data strucutre. It is also Mapping
, but its FromPath
will be the parent's FromPath
plus the FromPath
from this structure.
For the children part, suppose you have the structure:
{ "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": \[{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }\] }
You can specify a Mapping
that looks like:
{ "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": \[{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }\] }
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .children.is_none()
.
Trait Implementations§
source§impl PartialEq for Mapping
impl PartialEq for Mapping
impl StructuralPartialEq for Mapping
Auto Trait Implementations§
impl Freeze for Mapping
impl RefUnwindSafe for Mapping
impl Send for Mapping
impl Sync for Mapping
impl Unpin for Mapping
impl UnwindSafe for Mapping
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
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>
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>
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