Hello,

I have a use case like below.
USE CASE
I have a document with fields like

Id,
Id_type,
Field_1.
Filed_2

2 sample messages will look like

{
  "id": "12334",
  "id_type": "USER_RECORD",
  "field_1": null,
  "field_2": null
}


{
  "id": "31321",
  "id_type": "OWNER_RECORD",
  "field_1": null,
  "field_2": null
}


QUESTIONS

I’d like to define the unique key as a compound key from fields id and id_type

  1.  Could someone give me an example of how to do this ? Or point to the 
relevant section in the docs?
  2.  Is this the best way to define a compound primary key ? Is there a more 
efficient way ?

Regards,
Vivek

Reply via email to