A set of modules for streamlined querying, data-loading, and communication with Snowflake Database
Project description
snowmobile
snowmobile
is a set of modules for streamlined querying, data-loading, and overall interaction with the Snowflake Database - a brief overview of each is outlined below.
snowquery
snowquery
streamlines the authorization & execution of statements against the database via execute_query()
, which:
- Establishes a connection to the Database, defaulting to remain on the same session unless force-disconnected via
snowquery.disconnect()
- Defaults to return queried results in a pandas DataFrame
- Includes parameter-based support for multiple sets of credentials stored in a local snowflake_credentials.json file
- The locating & parsing of the credentials file is extracted into its own
snowcreds
sub-module for easier adaptation to security standards without needing to interact with the rest ofsnowmobile
's core functionality
- The locating & parsing of the credentials file is extracted into its own
snowloader
- `snowloader` streamlines the bulk-loading protocol outlined in the [Snowflake documentation](https://docs.snowflake.com/en/user-guide/data-load-overview.html) in the form of a `df_to_snowflake()` function, of which the primary features are: - Standardizing of DataFrame's columns prior to loading into the warehouse - DDL creation & execution if a pre-defined table to load data into doesn't exist - Parameter-based flexibility to append DataFrame's contents or replace pre-existing contentssnowparser
- `snowparser` is a simple module for parsing statements and *spans* of statements from within _.sql_ files via the `get_statement()` function - Primary benefit is that it re-imports the _.sql_ file each the function is called, avoiding the need to re-instantiate or import an instance of `script` each time an edit is made to the _.sql_ fileProject details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for snowmobile-0.0.9-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88e335019297ae6761a13fff4d078767f63c1dc3e75d8d72ae48dea95c7b9714 |
|
MD5 | d80d6b7733b5ee3e49a1856d3ed090c8 |
|
BLAKE2b-256 | 953331d2f290cec42e8c63fd44225a43ee316cdc6888c084a929eb39d82c2a51 |