Skip to content

Commit b2e774c

Browse files
author
Rahul Ajmera
committed
Updating twitter streaming sample to include default values for hostname and port
1 parent 44a2532 commit b2e774c

1 file changed

Lines changed: 23 additions & 3 deletions

File tree

samples/features/sql-big-data-cluster/spark/data-loading/spark-twitter-streaming-sample.ipynb

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,26 @@
8989
"outputs": [],
9090
"execution_count": 0
9191
},
92+
{
93+
"cell_type": "markdown",
94+
"source": [
95+
"Use the following cell to check your server name. If it returns ```master-0```, your hostname will be ```master-0.master-svc```. You will define this value in the Parameters section."
96+
],
97+
"metadata": {
98+
"azdata_cell_guid": "02e6cd9a-ef88-419c-afa0-e6a666f1070e"
99+
}
100+
},
101+
{
102+
"cell_type": "code",
103+
"source": [
104+
"SELECT @@Servername;"
105+
],
106+
"metadata": {
107+
"azdata_cell_guid": "0827942d-a223-4ba8-8168-2fb57a4a2488"
108+
},
109+
"outputs": [],
110+
"execution_count": 0
111+
},
92112
{
93113
"cell_type": "markdown",
94114
"source": [
@@ -141,7 +161,7 @@
141161
"### **2.4 Parameters**\r\n",
142162
"Enter the required parameters for the Spark streaming job to connect to SQL Server.\r\n",
143163
"\r\n",
144-
"In this example, the connection is made from Spark to the SQL Server master instance using the internal DNS name (master-9.master-svc) and port (1433). Alternatively, and especially if you are using a highly available Always On Availability Group, you can connect to the Kubernetes service that exposes the primary node of the Always On Availability Group.\r\n",
164+
"In this example, the connection is made from Spark to the SQL Server master instance using the internal DNS name (Ex: master-0.master-svc) and port (1433). Alternatively, and especially if you are using a highly available Always On Availability Group, you can connect to the Kubernetes service that exposes the primary node of the Always On Availability Group.\r\n",
145165
"\r\n",
146166
"#### Parameters needed to create Twitter stream\r\n",
147167
"- Twitter API authentication keys\r\n",
@@ -178,8 +198,8 @@
178198
"val password = \"password\"\r\n",
179199
"\r\n",
180200
"// Spark-SQL connector parameters\r\n",
181-
"val hostname = \"\"\r\n",
182-
"val port = 0000\r\n",
201+
"val hostname = \"master-0.master-svc\"\r\n",
202+
"val port = 1433\r\n",
183203
"val database = \"TwitterData\"\r\n",
184204
"val url = s\"jdbc:sqlserver://${hostname}:${port};database=${database};user=${user};password=${password};\"\r\n",
185205
"val dbtable = \"Tweets\"\r\n",

0 commit comments

Comments
 (0)