You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+66-18
Original file line number
Diff line number
Diff line change
@@ -70,17 +70,46 @@ The script `01-enable-cdc.sql` enable Change Data Capture on the aforementioned
70
70
All data gathered by Change Data Capture will be send to Event Hubs, so create an Azure Event Hubs in your Azure Subscription. Using the [Azure Cloud Shell](https://shell.azure.com/) Bash:
Later in the configuration process you'll need the EventHubs connection string, so grab it and store it somewhere:
81
102
82
103
```bash
83
-
az eventhubs namespace authorization-rule keys list -g debezium --namespace-name debezium -n RootManageSharedAccessKey --query "primaryConnectionString" -o tsv
104
+
RESOURCE_GROUP=debezium
105
+
EVENTHUB_NAMESPACE=debezium
106
+
107
+
az eventhubs namespace authorization-rule keys list \
108
+
--resource-group $RESOURCE_GROUP \
109
+
--namespace-name $EVENTHUB_NAMESPACE \
110
+
--name RootManageSharedAccessKey \
111
+
--query "primaryConnectionString" \
112
+
--output tsv
84
113
```
85
114
86
115
### Run Debezium
@@ -96,12 +125,12 @@ If prefer a more lean and quick easy to start using Debezium, you can just use t
96
125
Docker Compose will use `.env` to get the environment variables values used in the `.yaml` configuration file. The provided `.env.template` file look like the following:
Copy it and create a new `.env` file. Leave the version set to 1.6. Change the `EH_NAME` to the EventHubs name you created before. Also set `EH_CONNECTION_STRING` to hold the EventHubs connection string you got before. Make sure not to use any additional quotes or double quotes.
133
+
Copy it and create a new `.env` file. Leave the version set to `2.7`. Change the `EVENTHUB_NAMESPACE` to the EventHubs name you created before. Also set `EVENTHUB_CONNECTION_STRING` to hold the EventHubs connection string you got before. Make sure not to use any additional quotes or double quotes.
105
134
106
135
#### The .yaml file
107
136
@@ -154,38 +183,54 @@ Once the startup has finished, you'll see something like
154
183
[Worker clientId=connect-1, groupId=1] Finished starting connectors and tasks [org.apache.kafka.connect.runtime.distributed.DistributedHerder]
155
184
```
156
185
157
-
you will see three topics (or EventHub to use the Azure EventHubs nomenclature):
186
+
you will see four topics (or EventHub to use the Azure EventHubs nomenclature):
158
187
159
188
```bash
160
-
az eventhubs eventhub list -g debezium --namespace debezium -o table
189
+
190
+
RESOURCE_GROUP=debezium
191
+
EVENTHUB_NAMESPACE=debezium
192
+
193
+
az eventhubs eventhub list \
194
+
--resource-group $RESOURCE_GROUP \
195
+
--namespace-name $EVENTHUB_NAMESPACE \
196
+
--output table
161
197
```
162
198
163
199
and the result will show:
164
200
165
201
- debezium_configs
166
202
- debezium_offsets
167
203
- debezium_statuses
204
+
- schemahistory
168
205
169
206
to explore Azure Event Hubs is strongly suggest to download and use [Service Bus Explorer](https://github.com/paolosalvatori/ServiceBusExplorer)
170
207
171
208
#### Register SQL Server Connector
172
209
173
-
Now that Debezium is running, the SQL Server Connector (which is used both for connecting to Azure SQL or SQL Server) can be registered. Before doing that, make sure to specify the correct connection for your SQL Server instance in the `debezium/register-sqlserver-eh.json` file. You can create one using the provided `.template` file.
210
+
Now that Debezium is running, the SQL Server Connector (which is used both for connecting to Azure SQL or SQL Server) can be registered. Before doing that, make sure to specify the correct connection for your SQL Server instance in a file named `sqlserver-connector-config.json`. You can create one using the template file [sqlserver-connector-config.json.template](debezium/sqlserver-connector-config.json.template) file.
174
211
175
-
If you are using the Wide World Importers database, the only values you have to change are:
212
+
Make sure to change the following properties to match your SQL Server configuration:
You would need to replace `<eventhub_namespace>`, `<eventhub_schema_history>`, and `<eventhub_connectionstring>` with proper values.
233
+
189
234
All the other values used are explained in detail here:
190
235
191
236
[SQL Server Connector Configuration Values](./documentation/SQL-Server-Connector-Configuration-Value.md)
@@ -253,6 +298,9 @@ Congratulations, you now have a working Change Stream from SQL Server. This open
253
298
254
299
If you're using Debezium with Azure SQL MI or Azure SQL DB, you may want to run Debezium on Azure. Sample script to run the Debezium container on Azure Container Instances are available in the `debezium/azure` folder.
255
300
301
+
Please note that the script [01-register-connector.sh](debezium/azure/01-register-connector.sh) will take care of creating the Debezium SQL Server connector configuration JSON file, and then will use it to register a new connector on Debezium.
302
+
The generated file will be stored in the `debezium` folder.
303
+
256
304
### Connector Configuration
257
305
258
306
More details on SQL Server and Event Hubs specific configuration here:
0 commit comments