Skip to main content

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 of snowmobile's core functionality

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 contents

snowparser

- `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_ file

Project details


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

snowmobile-0.0.10-py2.py3-none-any.whl (17.9 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page