Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sfguide template #16

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sfguide/LEGAL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This application is not part of the Snowflake Service and is governed by the terms in LICENSE, unless expressly agreed to in writing. You use this application at your own risk, and Snowflake has no obligation to support your use of this application.
10 changes: 10 additions & 0 deletions sfguide/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[![Snowflake - Certified](https://img.shields.io/badge/Snowflake-Certified-2ea44f?style=for-the-badge&logo=snowflake)](https://developers.snowflake.com/solutions/)
# <! quickstart_name | capitalize !>

## Overview
<1-2 sentence description> Through this quickstart guide, you will explore what's new in Snowflake for Machine Learning. You will build an end to end ML workflow from feature engineering to model training and deployment using Snowflake ML in Snowflake Notebooks.

<!! if quickstart_link != '' !!>
## Step-By-Step Guide
For prerequisites, setup, step-by-step guide and instructions, please refer to the [QuickStart Guide](https://quickstarts.snowflake.com/guide/<! quickstart_link !>).
<!! endif !!>
9 changes: 9 additions & 0 deletions sfguide/scripts/setup.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
USE ROLE <! setup_role | upper !>;

CREATE OR REPLACE WAREHOUSE <! ( prefix ~ '_' ~ warehouse )| upper | replace('-', '_') !>;

CREATE OR REPLACE DATABASE <! ( prefix ~ '_' ~ database )| upper | replace('-', '_') !>;
CREATE OR REPLACE SCHEMA <! 'PUBLIC' if schema == 'PUBLIC' else ( prefix ~ '_' ~ schema )| upper | replace('-', '_') !>;
CREATE OR REPLACE STAGE <! ( prefix ~ '_' ~ stage )| upper | replace('-', '_') !>;

CREATE ROLE IF NOT EXISTS <! ( prefix ~ '_' ~ role )| upper | replace('-', '_') !>;
5 changes: 5 additions & 0 deletions sfguide/scripts/teardown.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
DROP WAREHOUSE IF EXIST <! ( prefix ~ '_' ~ warehouse )| upper | replace('-', '_') !>;

DROP DATABASE IF EXIST <! ( prefix ~ '_' ~ database )| upper | replace('-', '_') !>;

DROP ROLE IF EXISTS <! ( prefix ~ '_' ~ role )| upper | replace('-', '_') !>;
31 changes: 31 additions & 0 deletions sfguide/template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
minimum_cli_version: "2.8.0"
files_to_render:
- scripts/setup.sql
- scripts/teardown.sql
- README.md
variables:
- name: quickstart_name
prompt: "Name of the quickstart"
- name: quickstart_link
default: "TODO"
prompt: "Name of the to the existing quickstart, as in link"
- name: prefix
prompt: "Prefix used for objects created in Snowflake"
- name: setup_role
default: "ACCOUNTADMIN"
prompt: "Role to used to run setup script"
- name: warehouse
default: "DEMO_WH"
prompt: "Warehouse to be created. Will be prefixed"
- name: database
default: "DEMO_DB"
prompt: "Database to be created. Will be prefixed"
- name: schema
default: "PUBLIC"
prompt: "Schema to be created. Will be prefixed if not PUBLIC"
- name: stage
default: "DEMO_STAGE"
prompt: "Stage to be created. Will be prefixed"
- name: role
default: "DEMO_RL"
prompt: "Role to be created. Will be prefixed"