Mapping
¶
Source code in docs_src/capo_glue/types/mapping.py
children
instance-attribute
¶
children: NotRequired[Mappings]
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, }] }
dropped
instance-attribute
¶
dropped: NotRequired[BoxedBoolean]
If true, then the column is removed.
from_path
instance-attribute
¶
from_path: NotRequired[EnclosedInStringProperties]
The table or column to be modified.
from_type
instance-attribute
¶
from_type: NotRequired[EnclosedInStringProperty]
The type of the data to be modified.
to_key
instance-attribute
¶
to_key: NotRequired[EnclosedInStringProperty]
After the apply mapping, what the name of the column should be. Can be the same as FromPath.
to_type
instance-attribute
¶
to_type: NotRequired[EnclosedInStringProperty]
The data type that the data is to be modified to.