From f5447f9bf55f3d44afe233a43283f6cea25ecbff Mon Sep 17 00:00:00 2001 From: Tyler White Date: Tue, 13 Aug 2024 15:58:20 -0400 Subject: [PATCH] refactor: snowparkify example_helper dataframe expr --- ...to-end ML with Feature Store and Model Registry.ipynb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/End-to-end ML with Feature Store and Model Registry/End-to-end ML with Feature Store and Model Registry.ipynb b/End-to-end ML with Feature Store and Model Registry/End-to-end ML with Feature Store and Model Registry.ipynb index cd67ee2..b711e2c 100644 --- a/End-to-end ML with Feature Store and Model Registry/End-to-end ML with Feature Store and Model Registry.ipynb +++ b/End-to-end ML with Feature Store and Model Registry/End-to-end ML with Feature Store and Model Registry.ipynb @@ -807,12 +807,9 @@ ], "source": [ "sample_count = 512\n", - "source_df = session.sql(f\"\"\"\n", - " select {','.join(label_cols)}, \n", - " {','.join(join_keys)} \n", - " {',' + timestamp_col if timestamp_col is not None else ''} \n", - " from {spine_table}\n", - "\"\"\")\n", + "source_df = session.table(spine_table).select(\n", + " label_cols + join_keys + [timestamp_col] if timestamp_col else []\n", + ")\n", "spine_df = source_df.sample(n=sample_count)\n", "# preview spine dataframe\n", "spine_df.show()"