Skip to content
Open
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
8 changes: 4 additions & 4 deletions .devcontainer/connections.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
#export SNOWFLAKE_DEFAULT_CONNECTION_NAME="default"

[default]
account = "myaccount"
user = "myuser"
password = "mypassword"
account = "XKFAXIW.OHB38790"
user = "jayshreemankape"
password = "eMvgH8dqhybS9W8"
role = "HOL_ROLE"
warehouse = "HOL_WH"
database = "HOL_DB"
schema = "ANALYTICS"
schema = "HARMONIZED"
37 changes: 37 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy Snowpark Apps

# Controls when the action will run.
on:
push:
branches:
- main

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install Python packages
run: pip install -r requirements.txt

- name: Deploy Snowpark apps
env:
SNOWFLAKE_ACCOUNT: ${{ secrets.SNOWFLAKE_ACCOUNT }}
SNOWFLAKE_USER: ${{ secrets.SNOWFLAKE_USER }}
SNOWFLAKE_PASSWORD: ${{ secrets.SNOWFLAKE_PASSWORD }}
SNOWFLAKE_ROLE: ${{ secrets.SNOWFLAKE_ROLE }}
SNOWFLAKE_WAREHOUSE: ${{ secrets.SNOWFLAKE_WAREHOUSE }}
SNOWFLAKE_DATABASE: ${{ secrets.SNOWFLAKE_DATABASE }}
run: python deploy_snowpark_apps.py $GITHUB_WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
# SNOWFLAKE ADVANTAGE: SnowCLI (PuPr)

import sys

from scipy.constants import convert_temperature

def main(temp_f: float) -> float:
return (float(temp_f) - 32) * (5/9)
return convert_temperature(float(temp_f), 'F', 'C')


# For local debugging
Expand Down
1 change: 1 addition & 0 deletions steps/05_fahrenheit_to_celsius_udf/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
snowflake-snowpark-python
sc