Skip to content

Commit

Permalink
use Path to get token and address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ncclementi committed Feb 7, 2025
1 parent 83c2b56 commit 25b3161
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions source/examples/rapids-snowflake-cudf/notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -137,19 +137,14 @@
"outputs": [],
"source": [
"import os\n",
"from pathlib import Path\n",
"\n",
"from snowflake.snowpark import Session\n",
"\n",
"\n",
"def get_login_token():\n",
" with open(\"/snowflake/session/token\") as f:\n",
" return f.read()\n",
"\n",
"\n",
"connection_parameters = {\n",
" \"account\": os.getenv(\"SNOWFLAKE_ACCOUNT\"),\n",
" \"host\": os.getenv(\"SNOWFLAKE_HOST\"),\n",
" \"token\": get_login_token(),\n",
" \"token\": Path(\"/snowflake/session/token\").read_text(),\n",
" \"authenticator\": \"oauth\",\n",
" \"database\": \"CUDF_SNOWFLAKE_EXAMPLE\", # the created database\n",
" \"schema\": \"PUBLIC\",\n",
Expand Down Expand Up @@ -192,9 +187,9 @@
"source": [
"Notice that up to this point, we have a snowpark dataframe. To get a pandas dataframe we use `.to_pandas()`\n",
"\n",
"**NOTE:**\n",
"\n",
"At the moment, there is a known issue that is preventing us to accelerate the following step with cudf, and we hope to solve this issue soon. In the meantime we need to do a workaround to get the data into a pandas dataframe that `cudf.pandas` can understand. "
"```{warning}\n",
"At the moment, there is a known issue that is preventing us to accelerate the following step with cudf, and we hope to solve this issue soon. In the meantime we need to do a workaround to get the data into a pandas dataframe that `cudf.pandas` can understand.\n",
"```"
]
},
{
Expand Down

0 comments on commit 25b3161

Please sign in to comment.