spark_auto_mapper.data_types.decimal

Module Contents

Classes

AutoMapperDecimalDataType

Base class for all Automapper data types

class spark_auto_mapper.data_types.decimal.AutoMapperDecimalDataType(value, precision, scale)

Bases: spark_auto_mapper.data_types.data_type_base.AutoMapperDataTypeBase

Base class for all Automapper data types

Specifies the value should be used as a decimal :param value: :param precision: the maximum total number of digits (on both sides of dot) :param scale: the number of digits on right side of dot

Parameters
  • value (spark_auto_mapper.type_definitions.defined_types.AutoMapperAmountInputType) –

  • precision (int) –

  • scale (int) –

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