Question about data structure: interview__key vs. interview__id

It appears there are 2 fields that serve as a key to the Interview.
And I believe this structure is used in the other major data objects (questionnaire, assignment, etc).

I’ve been using the GUID in the tools I’m creating, but I’m trying to understand why the data structure was designed with 2 separate key fields. Can anyone elaborate on this?


While both keys perform the function of identifying cases, each key plays a distinct role:

  • interview__id is a unique identifier most useable by machines. It will always identify cases.
  • interview__key is an identifier for humans. In the absence of user-created keys (e.g., region + district + household id), interview__key provides a short key that can be used by all users to talk about a case. While the interview__id is only visible in export data (and, if you pay attention, in the URL of an interview being reviewed on HQ/Supervisor), interview__key is visible to users in all roles: by Interviewer on the tablet, by Supervisor on tablet/web, and by HQ on the web and in the exported data.

Thanks Arthur! that makes sense.

See also here:

1 Like