Skip to content

Commit 9e002c8

Browse files
Merge pull request #14 from stewartbryson/stewart
Notebook.
2 parents 3956290 + aefff1b commit 9e002c8

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ Secondly, I just couldn't stand for having the `DimTrade` table be "both a dimen
1919
This decision was made during an era when storage and compute were constrained, so in my design, I created both `DIM_TRADE` and `FACT_TRADE` tables.
2020
Finally, I used a Medallion Lakehouse Architecture with Bronze, Silver, and Gold zones, with the logical model above materialized in the Gold zone.
2121

22+
# Demo Notebook
23+
I've included a [demo Jupyter notebook](demo.ipynb) that walks through a subset of the instructions below. This notebook pairs with a presentation I give that focuses more on how Snowpark Python was used in the CLI, and also the motivation for using Dynamic Tables with dbt. But it may still be helpful.
24+
2225
# Using DIGen.jar to Generate Source Files
2326
The Java program to generate the source files is downloaded by [filling out a form on the TPC-DI website](https://www.tpc.org/TPC_Documents_Current_Versions/download_programs/tools-download-request5.asp?bm_type=TPC-DI&bm_vers=1.1.0&mode=CURRENT-ONLY) and clicking a link in an email. Once unzipped, we have to make one slight change for running on macOS:
2427

demo.ipynb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@
154154
"import json\n",
155155
"from snowflake.snowpark.types import *\n",
156156
"from snowflake.snowpark.functions import *\n",
157+
"from snowflake.snowpark import Session\n",
157158
"\n",
158159
"# Read the credentials.json file\n",
159160
"with open(\"credentials.json\") as jsonfile:\n",
@@ -165,7 +166,10 @@
165166
" .builder\n",
166167
" .configs(credentials_dict)\n",
167168
" .create()\n",
168-
")"
169+
")\n",
170+
"\n",
171+
"# Constants\n",
172+
"source_path = '/Users/stewartbryson/dev/tpcdi-output/Batch1'"
169173
]
170174
},
171175
{
@@ -183,8 +187,7 @@
183187
"metadata": {},
184188
"outputs": [],
185189
"source": [
186-
"# File paths\n",
187-
"source_path = '/Users/stewartbryson/dev/tpcdi-output/Batch1'\n",
190+
"# Constants\n",
188191
"stage_path = \"@tpcdi/Batch1\"\n",
189192
"\n",
190193
"# Put the file\n",

0 commit comments

Comments
 (0)