Deserializer for Snowflake.
- class diepvries.deserializers.snowflake_deserializer.DatabaseConfiguration(database, user, password, warehouse, account)¶
Needed fields to create a Snowflake database connection.
- account: str¶
- database: str¶
- password: str¶
- user: str¶
- warehouse: str¶
- class diepvries.deserializers.snowflake_deserializer.SnowflakeDeserializer(target_schema, target_tables, database_configuration, driving_keys=None, role_playing_hubs=None)¶
Deserialize a Data Vault model, based on Snowflake system metadata tables.
The deserialization process will consist in converting the list of target table names to a list of Table instances.
Each Table will have a list of Field instances (representing database table columns).
- __init__(target_schema, target_tables, database_configuration, driving_keys=None, role_playing_hubs=None)¶
Instantiate a SnowflakeDeserializer.
Besides setting __init__ arguments as class attributes, it also creates a Snowflake database connection.
Both target_tables and fields have their own setters (check @target_tables.setter and @fields.setter for more detail).
str) – Schema where the Data Vault model is stored.
str]) – Names of the tables that should be deserialized.
DatabaseConfiguration) – Holds all properties needed to create a Snowflake database connection.
DrivingKeyField]]) – List of fields that should be used as driving keys in current model’s effectivity satellites (if applicable).
str]]) – List of tables that should be created as RolePlayingHub objects. Each dictionary has the role playing hub as key and the parent table as value.
Representation of a SnowflakeDeserializer object as a string.
This helps the tracking of logging events per entity.
- Return type:
Logger string format.