spark_auto_mapper.data_types.map
¶
Module Contents¶
Classes¶
Applies the supplied mapping to the value of column |
- class spark_auto_mapper.data_types.map.AutoMapperMapDataType(column, mapping, default=None)¶
Bases:
spark_auto_mapper.data_types.expression.AutoMapperDataTypeExpression
Applies the supplied mapping to the value of column
- Parameters
column (spark_auto_mapper.type_definitions.wrapper_types.AutoMapperColumnOrColumnLikeType) –
mapping (Dict[Optional[spark_auto_mapper.type_definitions.defined_types.AutoMapperTextInputType], spark_auto_mapper.type_definitions.wrapper_types.AutoMapperAnyDataType]) –
default (Optional[spark_auto_mapper.type_definitions.wrapper_types.AutoMapperAnyDataType]) –
- get_column_spec(self, source_df, current_column)¶
Gets the column spec for this automapper data type
- Parameters
source_df (Optional[pyspark.sql.DataFrame]) – source data frame in case the automapper type needs that data to decide what to do
current_column (Optional[pyspark.sql.Column]) – (Optional) this is set when we are inside an array
- Return type
pyspark.sql.Column