Skip to content

cmpadden/sprocketship

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues LinkedIn


⚙️ 🚀

Sprocketship

Better stored procedure management
Explore the docs »

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

sprocketship makes it easy to develop, manage, and deploy stored procedures in Snowflake. Using the language of your choosing, you can write the contents of your stored procedure separately from its configurations (e.g., EXECUTE AS, RETURN TYPE, etc.).

Built With

(back to top)

Installation

pip install sprocketship

Usage

Currently, sprocketship expects a .sprocketship.yml file and a procedures/ directory at the same level in a directory structure.

├── dbt_models
│   ├── customers.sql
│   ├── products.sql
├── procedures
│   ├── admin
│   │   ├── create_database_writer_role.js
│   │   ├── create_database_reader_role.js
│   ├── development
│   │   ├── create_temp_database.js
└── .sprocketship.yml

The yaml path to each procedure in the sprocketship.yml should follow that of the paths to their corresponding files in the procedures/ directory.

procedures:
  development:
    - name: create_temp_database
      replace_if_exists: true
      database: {{ env.get('SNOWFLAKE_DATABASE') }}
      schema: {{ env.get('SNOWFLAKE_SCHEMA') }}
      ...

  admin:
    - name: create_database_reader
      replace_if_exists: true
      database: {{ env.get('SNOWFLAKE_DATABASE') }}
      schema: {{ env.get('SNOWFLAKE_SCHEMA') }}
      ...

    - name: create_database_writer
      replace_if_exists: true
      database: {{ env.get('SNOWFLAKE_DATABASE') }}
      schema: {{ env.get('SNOWFLAKE_SCHEMA') }}
      ...

From here, simply run sprocketship liftoff from the project directory (or provide the directory, e.g. sprocketship liftoff my/directory/path) and sprocketship will launch your stored procedures into the given directory.

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

About

Better stored procedure management

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 57.1%
  • JavaScript 42.9%