Example: Setting Up CDC with Non-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 with default partitions, a stream topic with custom partitions, a table changelog relationship from the source table to the destination stream topic, 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 -defaultpartitions 3

// Creating a stream topic that overrides the stream's default partitions
   maprcli stream topic create -path /streamVolume/changelogStream -topic cdcTopic1 -partitions 5
          
// Creating a changelog relationship between the source table and the stream plus using an existing topic that has custom partitions
   maprcli table changelog add -path /tableVolume/cdcTable -changelog /streamVolume/changelogStream:cdcTopic1  -useexistingtopic true

// 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&defaultpartitions=3

// Creating a stream topic that overrids the stream's default partitions
    https://10.10.100.17:8443/rest/stream/topic/create?path=/streamVolume/changelogStream&topic=cdcTopic1amp;partitions=5
          
// Creating a changelog relationship between the source table and the stream plus using an existing topic that has custom partitions
   https://10.10.100.17:8443/rest/table/changelog/add?path=/tableVolume/cdcTable&changelog=/streamVolume/changelogStream:cdcTopic1&useexistingtopic=true

// Viewing the changelog information
   https://10.10.100.17:8443/rest/table/changelog/info?changelog=/streamVolume/changelogStream:cdcTopic1