Hello everyone :wave: For upsert tables its specif...
# troubleshooting
l
Hello everyone 👋 For upsert tables its specified that you need to partition your input stream (kafka) by the primary key. How is this achieved when working with composite keys? I'm also curious how this works together with the column partition map, I thought it had to correspond to the partition in kafka?
For example..
This is the segment partitioning
Copy code
"tableIndexConfig": {
    "loadMode": "MMAP",
    "segmentPartitionConfig": {
      "columnPartitionMap": {
        "myPartitionKey": {
          "functionName": "Murmur",
          "numPartitions": 40
        }
      }
    },
Messages in the kafka topic are partitioned on "myPartitionKey" but the schema defines the composite primary key
Copy code
"primaryKeyColumns": ["myPartitionKey", "anotherKey"]
Is this correct?
m
@User @User for comments.
j
@User Your config should work because as long as
myPartitionKey
is partitioned, the composite keys are also partitioned
The prerequisite for using upsert is that all the records of the same primary key located in the same streaming partition
l
Great thank you. That is what I expected, and means it will work the way I have it now 👍