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
+43-19Lines changed: 43 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -70,25 +70,43 @@ 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:
71
71
72
72
```bash
73
+
# Set vars
74
+
RESOURCE_GROUP=debezium
75
+
LOCATION=eastus
76
+
EVENTHUB_NAMESPACE=debezium
77
+
EVENTHUB_SCHEMA_HISTORY=schemahistory
78
+
73
79
# create group
74
80
az group create \
75
-
--name debezium \
76
-
--location eastus
81
+
--name $RESOUCE_GROUP \
82
+
--location $LOCATION
77
83
78
-
# create eventhuvbs with kafka enabled
84
+
# create eventhub namespace with kafka enabled
79
85
az eventhubs namespace create \
80
-
--name debezium \
81
-
--resource-group debezium \
82
-
--location eastus \
86
+
--name $EVENTHUB_NAMESPACE \
87
+
--resource-group $RESOURCE_GROUP \
88
+
--location $LOCATION \
83
89
--enable-kafka
90
+
91
+
# create eventhub for schema history
92
+
az eventhubs eventhub create \
93
+
--resource-group $RESOURCE_GROUP
94
+
--namespace $EVENTHUB_NAMESPACE \
95
+
--name $EVENTHUB_SCHEMA_HISTORY \
96
+
--partition-count 1 \
97
+
--cleanup-policy Delete \
98
+
--retention-time-in-hours 168
84
99
```
85
100
86
101
Later in the configuration process you'll need the EventHubs connection string, so grab it and store it somewhere:
87
102
88
103
```bash
104
+
RESOURCE_GROUP=debezium
105
+
EVENTHUB_NAMESPACE=debezium
106
+
89
107
az eventhubs namespace authorization-rule keys list \
90
-
--resouce-group debezium \
91
-
--namespace-name debezium \
108
+
--resouce-group $RESOURCE_GROUP \
109
+
--namespace-name $EVENTHUB_NAMESPACE \
92
110
--name RootManageSharedAccessKey \
93
111
--query "primaryConnectionString" \
94
112
--output tsv
@@ -108,11 +126,11 @@ Docker Compose will use `.env` to get the environment variables values used in t
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 `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.
116
134
117
135
#### The .yaml file
118
136
@@ -165,7 +183,7 @@ Once the startup has finished, you'll see something like
165
183
[Worker clientId=connect-1, groupId=1] Finished starting connectors and tasks [org.apache.kafka.connect.runtime.distributed.DistributedHerder]
166
184
```
167
185
168
-
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):
169
187
170
188
```bash
171
189
az eventhubs eventhub list \
@@ -179,30 +197,36 @@ and the result will show:
179
197
- debezium_configs
180
198
- debezium_offsets
181
199
- debezium_statuses
200
+
- schemahistory
182
201
183
202
to explore Azure Event Hubs is strongly suggest to download and use [Service Bus Explorer](https://github.com/paolosalvatori/ServiceBusExplorer)
184
203
185
204
#### Register SQL Server Connector
186
205
187
206
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.
188
207
189
-
Please note that, the script [debezium/on-prem/register-connector.ps1](debezium/on-prem/register-connector.ps1) will take care of generating the Debezium SQL Server connector configuration JSON file, and then will use it to register a new connector on Debezium.
190
-
The generated file will be stored in the `debezium` folder.
191
-
192
-
If you are using the Wide World Importers database, the only values you have to change are:
208
+
Make sure to change the following properties to match your SQL Server configuration:
0 commit comments