snowmad

A Snowflake object transcription library for capturing Snowflake objects


License
MIT
Install
pip install snowmad==0.0.4

Documentation


snowmad: a snowflake transcription library

PyPI Latest Release Package Status License

What is it?

Snowmad is a Python package that provides utilities to transcribe snowflake objects. Currently transcribing objects form Snowflake to Terraform and transcribing objects from Snowflake to another Snowflake account is the primary focus of this package. The goal of this package is to cut down on writing one off scripts or manually wirting ddl for copying snowflake objects.

Main Features

  • Terraform
    • Transcribe snowflake users, roles, and role grants to terraform format
    • Currently terraform can import state, but cannot generate a config file from the imported state
    • To be used with snowflake provider (snowflake-labs/snowflake)
  • Snowflake Accounts
    • Copy databse objects ddl from one Snowflake account to another
    • Copy account level objects from one account to another including: warehouses, users, roles, and grants

Where to get it

The source code is currently hosted on GitHub at: https://github.com/PrestonBlackburn/snowmad

Binary installers for the latest released version are available at the Python Package Index (PyPI)

# PyPI
pip install snowmad

Dependencies

  • pandas - for data handling
  • snowflake.connector (with pandas addon, "snowflake-connector-python[pandas]") - for connecting to snowflake accounts and loading object data to dataframes
  • configparser - for handling snowflake account input data
  • cryptography - for accessing accounts via rsa key
  • snowflake connector

License

MIT

Documentation

See the current documentation on the wiki page

Outputs

  • roles text file
    • contains snowflake roles in terraform "snowflake_role" resource format
  • users text file
    • contains snowflake users in terraform "snowflake_user" resource format
  • grants text file
    • contains snowflake grants for roles in terraform "snowflake_role_grants" resource format