spark_auto_mapper.data_types.date_format
¶
Module Contents¶
Classes¶
Base class for all Automapper data types |
- class spark_auto_mapper.data_types.date_format.AutoMapperFormatDateTimeDataType(value, format_)¶
Bases:
spark_auto_mapper.data_types.data_type_base.AutoMapperDataTypeBase
Base class for all Automapper data types
Converts the date or timestamp to a string in Spark
- Parameters
value (spark_auto_mapper.type_definitions.wrapper_types.AutoMapperAnyDataType) – value
format – (Optional) formats to use for trying to format the value otherwise uses Spark defaults
format_ (str) –
- 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