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().