|
89 | 89 | "outputs": [], |
90 | 90 | "execution_count": 0 |
91 | 91 | }, |
| 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 | + }, |
92 | 112 | { |
93 | 113 | "cell_type": "markdown", |
94 | 114 | "source": [ |
|
141 | 161 | "### **2.4 Parameters**\r\n", |
142 | 162 | "Enter the required parameters for the Spark streaming job to connect to SQL Server.\r\n", |
143 | 163 | "\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", |
145 | 165 | "\r\n", |
146 | 166 | "#### Parameters needed to create Twitter stream\r\n", |
147 | 167 | "- Twitter API authentication keys\r\n", |
|
178 | 198 | "val password = \"password\"\r\n", |
179 | 199 | "\r\n", |
180 | 200 | "// 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", |
183 | 203 | "val database = \"TwitterData\"\r\n", |
184 | 204 | "val url = s\"jdbc:sqlserver://${hostname}:${port};database=${database};user=${user};password=${password};\"\r\n", |
185 | 205 | "val dbtable = \"Tweets\"\r\n", |
|
0 commit comments