Skip to content

Commit 2016472

Browse files
committed
created the fred data pipelin exec workflow yml file
1 parent f9ced38 commit 2016472

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Deploy Demo Objects
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Triggers the workflow when code is pushed to the main branch.
7+
workflow_dispatch: # Allows manual triggering from the GitHub Actions tab.
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: '3.10'
21+
22+
- name: Install Python packages
23+
run: pip install -r requirements.txt
24+
25+
- name: Deploy notebooks
26+
env:
27+
SNOWFLAKE_ACCOUNT: ${{ secrets.SNOWFLAKE_ACCOUNT }}
28+
SNOWFLAKE_USER: ${{ secrets.SNOWFLAKE_USER }}
29+
SNOWFLAKE_PASSWORD: ${{ secrets.SNOWFLAKE_PASSWORD }}
30+
SNOWFLAKE_ROLE: ${{ secrets.SNOWFLAKE_ROLE }}
31+
SNOWFLAKE_WAREHOUSE: ${{ secrets.SNOWFLAKE_WAREHOUSE }}
32+
SNOWFLAKE_DATABASE: ${{ secrets.SNOWFLAKE_DATABASE }}
33+
SNOWFLAKE_SCHEMA: ${{ secrets.SNOWFLAKE_SCHEMA }}
34+
run: |
35+
snow sql -q "ALTER GIT REPOSITORY FRED_GIT_REPO FETCH" --temporary-connection --account $SNOWFLAKE_ACCOUNT --user $SNOWFLAKE_USER --role $SNOWFLAKE_ROLE --warehouse $SNOWFLAKE_WAREHOUSE --database $SNOWFLAKE_DATABASE --schema $SNOWFLAKE_SCHEMA
36+
snow sql -q "EXECUTE IMMEDIATE FROM @FRED_GIT_REPO/branches/main/scripts/deploy_notebooks.sql USING (env => 'PROD', schema1 => 'RAW_FRED', schema2 => 'HARMONIZED', schema3 => 'ANALYTICS', branch => 'main')" --temporary-connection --account $SNOWFLAKE_ACCOUNT --user $SNOWFLAKE_USER --role $SNOWFLAKE_ROLE --warehouse $SNOWFLAKE_WAREHOUSE --database $SNOWFLAKE_DATABASE --schema $SNOWFLAKE_SCHEMA

0 commit comments

Comments
 (0)