butterfree.constants package

Submodules

Holds common column names, constant through all Butterfree.

DataType Enum Entity.

class butterfree.constants.data_type.DataType(value)

Bases: Enum

Holds constants for data types within Butterfree.

ARRAY_BIGINT = (ArrayType(LongType(), True), 'frozen<list<bigint>>', 'ARRAY<BIGINT>')
ARRAY_FLOAT = (ArrayType(FloatType(), True), 'frozen<list<float>>', 'ARRAY<FLOAT>')
ARRAY_STRING = (ArrayType(StringType(), True), 'frozen<list<text>>', 'ARRAY<STRING>')
BIGINT = (LongType(), 'bigint', 'BIGINT')
BINARY = (BinaryType(), 'boolean', 'BINARY')
BOOLEAN = (BooleanType(), 'boolean', 'BOOLEAN')
DATE = (DateType(), 'timestamp', 'DATE')
DECIMAL = (DecimalType(10,0), 'decimal', 'DECIMAL')
DOUBLE = (DoubleType(), 'double', 'DOUBLE')
FLOAT = (FloatType(), 'float', 'FLOAT')
INTEGER = (IntegerType(), 'int', 'INT')
STRING = (StringType(), 'text', 'STRING')
TIMESTAMP = (TimestampType(), 'timestamp', 'TIMESTAMP')

Migrations’ Constants.

Holds common spark constants, present through all Butterfree.

Allowed windows units and lengths in seconds.

Module contents

Holds constant attributes that are common for Butterfree.

class butterfree.constants.DataType(value)

Bases: Enum

Holds constants for data types within Butterfree.

ARRAY_BIGINT = (ArrayType(LongType(), True), 'frozen<list<bigint>>', 'ARRAY<BIGINT>')
ARRAY_FLOAT = (ArrayType(FloatType(), True), 'frozen<list<float>>', 'ARRAY<FLOAT>')
ARRAY_STRING = (ArrayType(StringType(), True), 'frozen<list<text>>', 'ARRAY<STRING>')
BIGINT = (LongType(), 'bigint', 'BIGINT')
BINARY = (BinaryType(), 'boolean', 'BINARY')
BOOLEAN = (BooleanType(), 'boolean', 'BOOLEAN')
DATE = (DateType(), 'timestamp', 'DATE')
DECIMAL = (DecimalType(10,0), 'decimal', 'DECIMAL')
DOUBLE = (DoubleType(), 'double', 'DOUBLE')
FLOAT = (FloatType(), 'float', 'FLOAT')
INTEGER = (IntegerType(), 'int', 'INT')
STRING = (StringType(), 'text', 'STRING')
TIMESTAMP = (TimestampType(), 'timestamp', 'TIMESTAMP')