Conversation
|
@wardi okay so the In the example schema you have: is that just to show that you can modify the return of the So in the terms of Canada stack, let's say we have Grants: To my understanding, all org tables would use the same sequence right? And that IS what we want? Like in that case, they would be fully unique in the Recombinant Combined table right? So if TBS makes a Grants record, the record _id would be 1, and then if CRA makes one afterwards, that record would be _id 2? Do you foresee users questioning jumps in their sequence numbers (in the Registry)? And if we want to get "fancy" with it we can concatenate to have some string formatted thing? e.g. (org_name capability coming from https://github.com/open-data/ckanext-canada/pull/1668/changes#diff-01ed71d02b0989f2bf56503bf31eab66be96a288626487db801964eaad4a9242R318) then we would have "grants-tbs-sct-1" ...but _id is not a text column right? so that would not work? I think our argument for not having those silly formatted reference numbers of "--" is that we have date fields and values, and have the org identifier in another field too right? like we don't need users dissecting a reference number / PK for that info? |
- Typing `| None` -> `Optional[]`
|
@wardi when uploading Excel file, I get |
|
@JVickery-TBS sorry, forgot to push the last commit |
|
The open_canada_id calculation I've suggested would make these ids not only unique across any PD type, but unique across the whole catalog if we are careful to always use a different mod 97 remainder value for each type of things (each sequence we create) While we could change the type of the _id field to text we would then lose the sorting-by-record-created-time we get for free with incrementing integer values If a client insists on a specially formatted ids like |
chromo definitions with
edit_using__id: truewill generate separate templates for create and update using the datastore's internal_idfield to identify records being edited.This allows direct updates to primary key values from excel and the form and prevents accidental overwriting of data from the reuse of a saved excel form (records can only be created once)
The
_idfield is normally a simple sequence per table, but thesample_pk_deluxe.yamlin this PR shows how to use a shared sequence and a bit of math to generate_idvalues that are: