Welcome to SnowDev's quickstart guide! In just a few minutes, you'll be up and running with SnowDev, ready to deploy components related to Snowflake using Snowpark.
Setup Python Environment
Ensure you have Python version 3.10
and above.
pyenv install 3.10.0
pyenv local 3.10.0
You can install SnowDev using pip or add it with poetry.
pip install snowdev
Start your SnowDev journey by initializing the directory structure for deployment, this will create necessary folders src and udf, sproc, streamlit components
snowdev init
Now that you have SnowDev installed and initialized, it's time to see it in action! Let's walk through the deployment of various components.
-
Add a New Stored Procedure
Add a new stored procedure named
test_script
:snowdev new --sproc test_script
-
Test the Stored Procedure Locally
Now, test your stored procedure locally to ensure everything works as expected:
snowdev test --sproc test_script
-
Deploy the Stored Procedure to Production
Satisfied with the local tests? Let's deploy it to production:
snowdev deploy --sproc test_script
-
Add a New UDF
Create a new UDF named
predict_sentiment
:snowdev new --udf predict_sentiment
-
Test the UDF Locally
Before deploying, test the UDF locally to ensure it behaves as intended:
snowdev test --udf predict_sentiment
-
Deploy the UDF to Production
Once local testing is complete, deploy the UDF to production:
snowdev deploy --udf predict_sentiment
-
Add a New Streamlit Application
Create a new Streamlit application named
order_chart_app
:snowdev new --streamlit "order_chart_app"
-
Deploy the Streamlit Application to Production
Ready to go live? Deploy the application to production:
snowdev deploy --streamlit "order_chart_app"
-
Add a New snowflake Task
Create a new task application named
sample_task
:snowdev new --task "sample_task"
Modify the sql in the src/task/sample_task/app.sql
-
Deploy the task Application to Production
Ready to go live? Deploy the application to production:
snowdev deploy --task "sample_task"
-
Resume the Task
Resume the task so it starts the schedule:
snowdev task --name "sample_task" --action resume
-
Initialize by embedding the knowledge
This embeds the knowledge base into a in memory chroma db vector DB:
snowdev ai --embed
-
Deploy a new stored procedure using AI
Give a clear description of what you need the stored procedure to do:
snowdev ai --sproc "I want to fetch data from order table and predict the bad orders using snowflake ml"
Congratulations! You've successfully deployed various components using SnowDev. Dive deeper and explore other commands and options mentioned in the main README to make the most out of SnowDev.