Example: Setting Up CDC with Default Topic Partitions
This example creates the following: a volume for a HPE Ezmeral Data Fabric Database table, a HPE Ezmeral Data Fabric Database JSON table, a HPE Ezmeral Data Fabric Streams changelog stream without changing the default partitions, creates a topic while adding a table changelog relationship from the source table to the destination stream topic and and views the changelog information.
// Creating and mounting a volume for the source table
maprcli volume create -name tableVolume -path /tableVolume
// Creating and mounting a volume for the destination stream
maprcli volume create -name streamVolume -path /streamVolume
// Creating a new JSON table
maprcli table create -path /tableVolume/cdcTable -tabletype json
// Creating a stream for CDC data
maprcli stream create -path /streamVolume/changelogStream -ischangelog true
// Creating a changelog relationship between the source table and the stream
maprcli table changelog add -path /tableVolume/cdcTable -changelog /streamVolume/changelogStream:cdcTopic1
// Viewing the changelog information
maprcli table changelog info -changelog /streamVolume/changelogStream:cdcTopic1 -json
// Creating and mounting a volume for the source table
https://10.10.100.17:8443/rest/volume/create?name=tableVolume&path=/tableVolume
// Creating and mounting a volume for the destination stream
https://10.10.100.17:8443/rest/volume/create?name=streamVolume&path=/streamVolume
// Creating a stream for CDC data
https://10.10.100.17:8443/rest/stream/create?path=/streamVolume/changelogStream&ischangelog=true
// Creating a changelog relationship between the source table and the stream
https://10.10.100.17:8443/rest/table/changelog/add?path=/tableVolume/cdcTable&changelog=/streamVolume/changelogStream:cdcTopic1
// Viewing the changelog information
https://10.10.100.17:8443/rest/table/changelog/info?changelog=/streamVolume/changelogStream:cdcTopic1