Skip to content

Commit c2f16a2

Browse files
authored
Merge pull request #1048 from Teradata/queryband_travel_insights
queryband updates
2 parents ba10f98 + 1aea522 commit c2f16a2

File tree

2 files changed

+55
-11
lines changed

2 files changed

+55
-11
lines changed

UseCases/Improving_Customer_Satisfaction_Travel_Insights/Improving_Customer_Satisfaction_Travel_Insights_SQL.ipynb

Lines changed: 48 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,6 @@
5555
"</ol>"
5656
]
5757
},
58-
{
59-
"cell_type": "markdown",
60-
"id": "fab91607-b6a5-476b-8128-83faf28aba91",
61-
"metadata": {},
62-
"source": [
63-
"<hr style=\"height:2px;border:none;\">\n",
64-
"<p style = 'font-size:16px;font-family:Arial;'><b>Note:</b> Before running this notebook, please ensure that the <code>Initialization_and_Model_Load.ipynb</code> notebook has been executed.</p>"
65-
]
66-
},
6758
{
6859
"cell_type": "markdown",
6960
"id": "af488e36-1525-4f87-943a-5f6881283ac1",
@@ -181,6 +172,54 @@
181172
"Select * from DEMO_Cust_Travel.Complaints sample 5;"
182173
]
183174
},
175+
{
176+
"cell_type": "markdown",
177+
"id": "162a0e9e-67d5-4bf6-8aca-21b49c37cac7",
178+
"metadata": {},
179+
"source": [
180+
"<p style = 'font-size:16px;font-family:Arial;'>Before proceeding further we will cross check that the embedding model is loaded in the database."
181+
]
182+
},
183+
{
184+
"cell_type": "code",
185+
"execution_count": null,
186+
"id": "4219e81b-c712-49a5-a365-b8f0a368db8e",
187+
"metadata": {},
188+
"outputs": [],
189+
"source": [
190+
"%var model=\"bge-small-en-v1.5\""
191+
]
192+
},
193+
{
194+
"cell_type": "code",
195+
"execution_count": null,
196+
"id": "0fc43ea5-70a7-4804-8117-1dfb3ee111f6",
197+
"metadata": {},
198+
"outputs": [],
199+
"source": [
200+
"select model_id from embeddings_models where model_id = '${model}'"
201+
]
202+
},
203+
{
204+
"cell_type": "markdown",
205+
"id": "194ee355-24ba-4908-b6a7-0b5c12a7c2fd",
206+
"metadata": {
207+
"tags": []
208+
},
209+
"source": [
210+
"<p style = 'font-size:16px;font-family:Arial;'>If you see the message \" Unable to run SQL: Unable to run SQL query: Database reported error:3807:Object 'embeddings_models' does not exist.\", Please execute this notebook: <br><a href = './Initialization_and_Model_Load_Travel_Insights.ipynb'>Initialization_and_Model_Load_Travel_Insights</a>. "
211+
]
212+
},
213+
{
214+
"cell_type": "markdown",
215+
"id": "504385c3-0364-47f8-8742-5b7f5f84a74e",
216+
"metadata": {},
217+
"source": [
218+
"<div class=\"alert alert-block alert-info\">\n",
219+
"<p style = 'font-size:16px;font-family:Arial'>If you see the message \"<i>Unable to run SQL: Unable to run SQL query: Database reported error:3807:Object 'embeddings_models' does not exist.</i>\",<br>Please execute this notebook: <a href = './Initialization_and_Model_Load_Travel_Insights.ipynb'><b>Initialization_and_Model_Load_Travel_Insights<b></a>.\n",
220+
"</div>"
221+
]
222+
},
184223
{
185224
"cell_type": "markdown",
186225
"id": "bf769b70-a60b-4f29-b399-c9ee96e1697e",

UseCases/Improving_Customer_Satisfaction_Travel_Insights/Initialization_and_Model_Load.ipynb renamed to UseCases/Improving_Customer_Satisfaction_Travel_Insights/Initialization_and_Model_Load_Travel_Insights.ipynb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,14 @@
7979
" execute_sql,\n",
8080
" save_byom,\n",
8181
" remove_context,\n",
82-
" DataFrame\n",
82+
" DataFrame,\n",
83+
" configure,\n",
84+
" db_drop_table\n",
85+
" \n",
8386
")\n",
8487
"\n",
88+
"configure.byom_install_location = 'mldb'\n",
89+
"\n",
8590
"display.max_rows = 5\n",
8691
"\n",
8792
"# Suppress warnings\n",
@@ -122,7 +127,7 @@
122127
"outputs": [],
123128
"source": [
124129
"%%capture\n",
125-
"execute_sql(\"SET query_band='DEMO=Language_Model_Init_Python.ipynb;' UPDATE FOR SESSION;\")"
130+
"execute_sql(\"SET query_band='DEMO=Initialization_and_Model_Load_Travel_Insights.ipynb;' UPDATE FOR SESSION;\")"
126131
]
127132
},
128133
{

0 commit comments

Comments
 (0)