How do I use a lookup table where a primary key matches multiple results?
For example, in my dataset, some users have multiple computers on the same home network, so a single IP address is the same for multiple data entries. Is there a way to have a lookup table retrieve all matches instead of throwing an error for having multiple entries with the same value?
Primary keys must be unique for every row in a lookup table (LUT). One option is to keep using the IP address as the primary key, but store the rest of the information (computer name, email address, etc) as an array in the other column of the table.
Also, please note that the primary key can be an array so you can avoid duplicate rows with different keys. The keys still need to be unique per record in the LUT. This can be implemented in the LUT schema, by making the primary key column an array of strings and putting all the keys for the record in that column. For example, Panther has implemented this in the Okta.Users schema, here.