DataHub
PKey, ID, Name for child records

With lots of importing, you will have values that you are referring, sub-tables, that have child or referenced data.

Why no name?

You will first notice that we don't ask you for Name!

That is because in referenced data, it has no value. We would ignore it.

Why? Because Name is looked up from PKey or ID. We look at the child row and pull its Name over. Because the Name in the "parent" record is always set to the name of the child at the time the value was created. Hence- we would always ignore the name of the child if you gave it to us, because it would be a referential data error to use anything other than the value the child currently has.

If the above is confusing, read it like this: "We get the name from the child record, that is the authoritative location."

Noting that name is NOT a unique value. You can have 2 child PKeys that have the same name. It is an information only field.

Should I give both the ID and PKey if I have them?

Generally, yes. See below for details.

Do I have to give ID?

The simple answer is "No."

In general, we will get the ID from the PKey, since the PKey is required to be unique on the child, if you only provide us with the PKey; the same way we grab the Name for you. So we only normally need either the ID or the PKey.

The longer answer is twofold:

  • You have to provide EITHER the ID or the PKey.
  • If you provide both, and the PKey is missing, we will attempt to 'recover' using the ID. This is helpful when someone deletes a record then realizes they need it so they add it back. The PKey will be different, but the ID may be the same if they do a good job.

Do I have to give PKey?

The simple answer is "No."

If you don't give us the PKey, since the ID is required to be unique on the child, we will get the PKey from the ID if you provide us with only the ID; the same way we grab the Name for you. So we only normally need either the PKey or the ID.

The longer answer is twofold, as above:

  • You have to provide EITHER the ID or the PKey.
  • If you provide just the PKey, no problem we will use it. With the following caveat: If someone deleted the item then added it back (and yes this seems to happen a lot) because they realized they shouldn't have deleted it – the PKey will no longer be the same. But if you only give us the PKey, we won't be able to recover for you using the ID.
    • The corollary is: If you do NOT want us to attempt recovering using the ID – don't give us the ID!