diepvries package

Definitions and helpers.

class diepvries.FieldDataType(value)

Bases: Enum

Possible data types for a Field.

These data types are mapped directly from Snowflake root data types (the ones that are actually stored in Snowflake metadata views).

ARRAY = 'ARRAY'
BOOLEAN = 'BOOLEAN'
DATE = 'DATE'
GEOGRAPHY = 'GEOGRAPHY'
NUMBER = 'NUMBER'
OBJECT = 'OBJECT'
REAL = 'REAL'
TEXT = 'TEXT'
TIME = 'TIME'
TIMESTAMP_LTZ = 'TIMESTAMP_LTZ'
TIMESTAMP_NTZ = 'TIMESTAMP_NTZ'
TIMESTAMP_TZ = 'TIMESTAMP_TZ'
VARIANT = 'VARIANT'
class diepvries.FieldRole(value)

Bases: Enum

Possible roles for each field in a Data Vault model.

BUSINESS_KEY = 'business_key'
CHILD_KEY = 'child_key'
DESCRIPTIVE = 'descriptive'
DRIVING_KEY = 'driving_key'
HASHDIFF = 'hashdiff'
HASHKEY = 'hashkey'
HASHKEY_PARENT = 'hashkey_parent'
METADATA = 'metadata'
class diepvries.FixedPrefixLoggerAdapter(logger, prefix)

Bases: LoggerAdapter

Logger with a prefix.

This LoggerAdapter implementation prefixes log calls with “[prefix]”.

This is useful to add contextually valuable information to the log call (Snowflake username and session ID) without changing the logging format of the root logger.

__init__(logger, prefix)

Instantiate logger.

process(msg, kwargs)

Process a message.

class diepvries.TableType(value)

Bases: Enum

Possible types of a table in a Data Vault model.

HUB = 'hub'
SATELLITE = 'satellite'