Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the docs for embedded_release release_type #125

Merged
merged 3 commits into from
Jul 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/database.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ Otherwise, the :ref:`add-view` command *with* the ``--dontbuild`` flag creates t
How tables are related
~~~~~~~~~~~~~~~~~~~~~~

All summary tables have an ``id`` column and a ``release_type`` column. This ``id`` column refers to the ``id`` column in the ``release_summary`` table. The ``table_id`` column in the ``release_summary`` table refers the ``id`` column in either Kingfisher Process' ``release``, ``record`` or ``compiled_release`` table; the table is indicated by the ``release_type`` column.
Each summary table has an ``id`` column and a ``release_type`` column. The ``id`` column in a summary table refers to the ``id`` column in the ``release_summary`` table. For a given ``id`` value, the ``release_type`` value is the same in all tables (in other words, the ``release_type`` column is `denormalized <https://en.wikipedia.org/wiki/Denormalization>`__).

Note that, in the case of Kingfisher Process' ``record`` table, the record's data's ``compiledRelease`` is used in summaries.
The ``table_id`` column in the ``release_summary`` table refers to the ``id`` column in either Kingfisher Process' ``release``, ``record`` or ``compiled_release`` table. If the ``release_type`` is "embedded_release", the referred table is the ``record`` table. Otherwise, the referred table matches the value of the ``release_type`` column (either "release", "record" or "compiled_release").

If the ``release_type`` is "record", then the record's ``compiledRelease`` field is used to generate summaries. If the ``release_type`` is "embedded_release", then the record's ``releases`` array is used to generate summaries.

Foreign key relationships exist on all `tables <https://www.postgresql.org/docs/current/sql-createtable.html>`__ (but not `views <https://www.postgresql.org/docs/current/sql-createview.html>`__) within a schema, as shown in the Entity Relationship Diagram below (click on the image and zoom in to read more easily).

Expand Down
2 changes: 1 addition & 1 deletion docs/definitions/award_documents_summary.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Column Name,Data Type,Description
id,bigint,"Unique id representing a release, compiled_release or record"
award_index,bigint,Position of the award in the awards array
document_index,bigint,Position of the document in the documents array
release_type,text,"Either release, compiled_release or record. compiled_releases are releases generated by Kingfisher release compilation"
release_type,text,"Either release, record, compiled_release or embedded_release. With ""release"", individual releases are read through the release table. With ""record"", a compiled release is read from a record's compiledRelease field through the record table. With ""compiled_release"", a compiled release is read through the compiled_release table, which is calculated by Kingfisher Process (for example, by merging a collection of releases). With ""embedded_releases"", individual releases are read from a record's releases array through the record table."
collection_id,integer,id from Kingfisher collection table
ocid,text,ocid from the data
release_id,text,Release id from the data. Relevant for releases and not for compiled_releases or records
Expand Down
2 changes: 1 addition & 1 deletion docs/definitions/award_items_summary.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Column Name,Data Type,Description
id,bigint,"Unique id representing a release, compiled_release or record"
award_index,bigint,Position of the award in the awards array
item_index,bigint,Position of the item in the items array
release_type,text,"Either release, compiled_release or record. compiled_releases are releases generated by Kingfisher release compilation"
release_type,text,"Either release, record, compiled_release or embedded_release. With ""release"", individual releases are read through the release table. With ""record"", a compiled release is read from a record's compiledRelease field through the record table. With ""compiled_release"", a compiled release is read through the compiled_release table, which is calculated by Kingfisher Process (for example, by merging a collection of releases). With ""embedded_releases"", individual releases are read from a record's releases array through the record table."
collection_id,integer,id from Kingfisher collection table
ocid,text,ocid from the data
release_id,text,Release id from the data. Relevant for releases and not for compiled_releases or records
Expand Down
2 changes: 1 addition & 1 deletion docs/definitions/award_suppliers_summary.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Column Name,Data Type,Description
id,bigint,"Unique id representing a release, compiled_release or record"
award_index,bigint,Position of the award in the awards array
supplier_index,bigint,Position of the supplier in the supplier array
release_type,text,"Either release, compiled_release or record. compiled_releases are releases generated by Kingfisher release compilation"
release_type,text,"Either release, record, compiled_release or embedded_release. With ""release"", individual releases are read through the release table. With ""record"", a compiled release is read from a record's compiledRelease field through the record table. With ""compiled_release"", a compiled release is read through the compiled_release table, which is calculated by Kingfisher Process (for example, by merging a collection of releases). With ""embedded_releases"", individual releases are read from a record's releases array through the record table."
collection_id,integer,id from Kingfisher collection table
ocid,text,ocid from the data
release_id,text,Release id from the data. Relevant for releases and not for compiled_releases or records
Expand Down
2 changes: 1 addition & 1 deletion docs/definitions/awards_summary.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Column Name,Data Type,Description
id,bigint,"Unique id representing a release, compiled_release or record"
award_index,bigint,Position of the award in the awards array
release_type,text,"Either release, compiled_release or record. compiled_releases are releases generated by Kingfisher release compilation"
release_type,text,"Either release, record, compiled_release or embedded_release. With ""release"", individual releases are read through the release table. With ""record"", a compiled release is read from a record's compiledRelease field through the record table. With ""compiled_release"", a compiled release is read through the compiled_release table, which is calculated by Kingfisher Process (for example, by merging a collection of releases). With ""embedded_releases"", individual releases are read from a record's releases array through the record table."
collection_id,integer,id from Kingfisher collection table
ocid,text,ocid from the data
release_id,text,Release id from the data. Relevant for releases and not for compiled_releases or records
Expand Down
2 changes: 1 addition & 1 deletion docs/definitions/buyer_summary.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Column Name,Data Type,Description
id,bigint,"Unique id representing a release, compiled_release or record"
release_type,text,"Either release, compiled_release or record. compiled_releases are releases generated by Kingfisher release compilation"
release_type,text,"Either release, record, compiled_release or embedded_release. With ""release"", individual releases are read through the release table. With ""record"", a compiled release is read from a record's compiledRelease field through the record table. With ""compiled_release"", a compiled release is read through the compiled_release table, which is calculated by Kingfisher Process (for example, by merging a collection of releases). With ""embedded_releases"", individual releases are read from a record's releases array through the record table."
collection_id,integer,id from Kingfisher collection table
ocid,text,ocid from the data
release_id,text,Release id from the data. Relevant for releases and not for compiled_releases or records
Expand Down
2 changes: 1 addition & 1 deletion docs/definitions/contract_documents_summary.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Column Name,Data Type,Description
id,bigint,"Unique id representing a release, compiled_release or record"
contract_index,bigint,Position of the contract in the contracts array
document_index,bigint,Position of the document in the documents array
release_type,text,"Either release, compiled_release or record. compiled_releases are releases generated by Kingfisher release compilation"
release_type,text,"Either release, record, compiled_release or embedded_release. With ""release"", individual releases are read through the release table. With ""record"", a compiled release is read from a record's compiledRelease field through the record table. With ""compiled_release"", a compiled release is read through the compiled_release table, which is calculated by Kingfisher Process (for example, by merging a collection of releases). With ""embedded_releases"", individual releases are read from a record's releases array through the record table."
collection_id,integer,id from Kingfisher collection table
ocid,text,ocid from the data
release_id,text,Release id from the data. Relevant for releases and not for compiled_releases or records
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Column Name,Data Type,Description
id,bigint,"Unique id representing a release, compiled_release or record"
contract_index,bigint,Position of the contract in the contracts array
document_index,bigint,Position of the document in the documents array
release_type,text,"Either release, compiled_release or record. compiled_releases are releases generated by Kingfisher release compilation"
release_type,text,"Either release, record, compiled_release or embedded_release. With ""release"", individual releases are read through the release table. With ""record"", a compiled release is read from a record's compiledRelease field through the record table. With ""compiled_release"", a compiled release is read through the compiled_release table, which is calculated by Kingfisher Process (for example, by merging a collection of releases). With ""embedded_releases"", individual releases are read from a record's releases array through the record table."
collection_id,integer,id from Kingfisher collection table
ocid,text,ocid from the data
release_id,text,Release id from the data. Relevant for releases and not for compiled_releases or records
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Column Name,Data Type,Description
id,bigint,"Unique id representing a release, compiled_release or record"
contract_index,bigint,Position of the contract in the contracts array
milestone_index,bigint,Position of the milestone in the milestone array
release_type,text,"Either release, compiled_release or record. compiled_releases are releases generated by Kingfisher release compilation"
release_type,text,"Either release, record, compiled_release or embedded_release. With ""release"", individual releases are read through the release table. With ""record"", a compiled release is read from a record's compiledRelease field through the record table. With ""compiled_release"", a compiled release is read through the compiled_release table, which is calculated by Kingfisher Process (for example, by merging a collection of releases). With ""embedded_releases"", individual releases are read from a record's releases array through the record table."
collection_id,integer,id from Kingfisher collection table
ocid,text,ocid from the data
release_id,text,Release id from the data. Relevant for releases and not for compiled_releases or records
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ Column Name,Data Type,Description
id,bigint,"Unique id representing a release, compiled_release or record"
contract_index,bigint,Position of the contract in the contracts array
transaction_index,bigint,Position of the transaction in the transaction array
release_type,text,"Either release, compiled_release or record. compiled_releases are releases generated by Kingfisher release compilation"
release_type,text,"Either release, record, compiled_release or embedded_release. With ""release"", individual releases are read through the release table. With ""record"", a compiled release is read from a record's compiledRelease field through the record table. With ""compiled_release"", a compiled release is read through the compiled_release table, which is calculated by Kingfisher Process (for example, by merging a collection of releases). With ""embedded_releases"", individual releases are read from a record's releases array through the record table."
collection_id,integer,id from Kingfisher collection table
ocid,text,ocid from the data
release_id,text,Release id from the data. Relevant for releases and not for compiled_releases or records
data_id,integer,"id for the ""data"" table in Kingfisher that holds the original JSON data."
transaction_amount,numeric,`amount` field from either amount object or value object
transaction_currency,text,`currency` field from either amount object or value object
transaction_amount,numeric,`amount` field from the value object or the deprecated amount object
transaction_currency,text,`currency` field from the value object or the deprecated amount object
2 changes: 1 addition & 1 deletion docs/definitions/contract_items_summary.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Column Name,Data Type,Description
id,bigint,"Unique id representing a release, compiled_release or record"
contract_index,bigint,Position of the contract in the contracts array
item_index,bigint,Position of the item in the items array
release_type,text,"Either release, compiled_release or record. compiled_releases are releases generated by Kingfisher release compilation"
release_type,text,"Either release, record, compiled_release or embedded_release. With ""release"", individual releases are read through the release table. With ""record"", a compiled release is read from a record's compiledRelease field through the record table. With ""compiled_release"", a compiled release is read through the compiled_release table, which is calculated by Kingfisher Process (for example, by merging a collection of releases). With ""embedded_releases"", individual releases are read from a record's releases array through the record table."
collection_id,integer,id from Kingfisher collection table
ocid,text,ocid from the data
release_id,text,Release id from the data. Relevant for releases and not for compiled_releases or records
Expand Down
2 changes: 1 addition & 1 deletion docs/definitions/contract_milestones_summary.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Column Name,Data Type,Description
id,bigint,"Unique id representing a release, compiled_release or record"
contract_index,bigint,Position of the contract in the contracts array
milestone_index,bigint,Position of the milestone in the milestone array
release_type,text,"Either release, compiled_release or record. compiled_releases are releases generated by Kingfisher release compilation"
release_type,text,"Either release, record, compiled_release or embedded_release. With ""release"", individual releases are read through the release table. With ""record"", a compiled release is read from a record's compiledRelease field through the record table. With ""compiled_release"", a compiled release is read through the compiled_release table, which is calculated by Kingfisher Process (for example, by merging a collection of releases). With ""embedded_releases"", individual releases are read from a record's releases array through the record table."
collection_id,integer,id from Kingfisher collection table
ocid,text,ocid from the data
release_id,text,Release id from the data. Relevant for releases and not for compiled_releases or records
Expand Down
2 changes: 1 addition & 1 deletion docs/definitions/contracts_summary.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Column Name,Data Type,Description
id,bigint,"Unique id representing a release, compiled_release or record"
contract_index,bigint,Position of the contract in the contracts array
release_type,text,"Either release, compiled_release or record. compiled_releases are releases generated by Kingfisher release compilation"
release_type,text,"Either release, record, compiled_release or embedded_release. With ""release"", individual releases are read through the release table. With ""record"", a compiled release is read from a record's compiledRelease field through the record table. With ""compiled_release"", a compiled release is read through the compiled_release table, which is calculated by Kingfisher Process (for example, by merging a collection of releases). With ""embedded_releases"", individual releases are read from a record's releases array through the record table."
collection_id,integer,id from Kingfisher collection table
ocid,text,ocid from the data
release_id,text,Release id from the data. Relevant for releases and not for compiled_releases or records
Expand Down
2 changes: 1 addition & 1 deletion docs/definitions/parties_summary.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Column Name,Data Type,Description
id,bigint,"Unique id representing a release, compiled_release or record"
party_index,bigint,Position of the party in the parties array
release_type,text,"Either release, compiled_release or record. compiled_releases are releases generated by Kingfisher release compilation"
release_type,text,"Either release, record, compiled_release or embedded_release. With ""release"", individual releases are read through the release table. With ""record"", a compiled release is read from a record's compiledRelease field through the record table. With ""compiled_release"", a compiled release is read through the compiled_release table, which is calculated by Kingfisher Process (for example, by merging a collection of releases). With ""embedded_releases"", individual releases are read from a record's releases array through the record table."
collection_id,integer,id from Kingfisher collection table
ocid,text,ocid from the data
release_id,text,Release id from the data. Relevant for releases and not for compiled_releases or records
Expand Down
2 changes: 1 addition & 1 deletion docs/definitions/planning_documents_summary.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Column Name,Data Type,Description
id,bigint,"Unique id representing a release, compiled_release or record"
document_index,bigint,Position of the document in the documents array
release_type,text,"Either release, compiled_release or record. compiled_releases are releases generated by Kingfisher release compilation"
release_type,text,"Either release, record, compiled_release or embedded_release. With ""release"", individual releases are read through the release table. With ""record"", a compiled release is read from a record's compiledRelease field through the record table. With ""compiled_release"", a compiled release is read through the compiled_release table, which is calculated by Kingfisher Process (for example, by merging a collection of releases). With ""embedded_releases"", individual releases are read from a record's releases array through the record table."
collection_id,integer,id from Kingfisher collection table
ocid,text,ocid from the data
release_id,text,Release id from the data. Relevant for releases and not for compiled_releases or records
Expand Down
2 changes: 1 addition & 1 deletion docs/definitions/planning_milestones_summary.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Column Name,Data Type,Description
id,bigint,"Unique id representing a release, compiled_release or record"
milestone_index,bigint,Position of the milestone in the milestone array
release_type,text,"Either release, compiled_release or record. compiled_releases are releases generated by Kingfisher release compilation"
release_type,text,"Either release, record, compiled_release or embedded_release. With ""release"", individual releases are read through the release table. With ""record"", a compiled release is read from a record's compiledRelease field through the record table. With ""compiled_release"", a compiled release is read through the compiled_release table, which is calculated by Kingfisher Process (for example, by merging a collection of releases). With ""embedded_releases"", individual releases are read from a record's releases array through the record table."
collection_id,integer,id from Kingfisher collection table
ocid,text,ocid from the data
release_id,text,Release id from the data. Relevant for releases and not for compiled_releases or records
Expand Down
2 changes: 1 addition & 1 deletion docs/definitions/planning_summary.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Column Name,Data Type,Description
id,bigint,"Unique id representing a release, compiled_release or record"
release_type,text,"Either release, compiled_release or record. compiled_releases are releases generated by Kingfisher release compilation"
release_type,text,"Either release, record, compiled_release or embedded_release. With ""release"", individual releases are read through the release table. With ""record"", a compiled release is read from a record's compiledRelease field through the record table. With ""compiled_release"", a compiled release is read through the compiled_release table, which is calculated by Kingfisher Process (for example, by merging a collection of releases). With ""embedded_releases"", individual releases are read from a record's releases array through the record table."
collection_id,integer,id from Kingfisher collection table
ocid,text,ocid from the data
release_id,text,Release id from the data. Relevant for releases and not for compiled_releases or records
Expand Down
Loading