How to reference an existing parent document in CSV to Docs

I need upload a new list of CHWs using cht csv-to-docs but these need to be attached to a hospital in the hierarchy that already exists in couchdb upstream. What is the recommended way of referencing the already existing parent document in the CSV.

1 Like

If you put the UUID of the parent (hospital) under column parent._id, it should work.


Thanks @binod, I see that I can also build a deeper doc using a chain e.g having 2 columns like parent._id, parent.parent._id builds a nice doc as

"parent": {
    "_id": "parent_id",
    "parent": {
      "_id": "parent_parent_id"