archive_rule
Rules archiving records that were replaced by another record or deliberately dropped.
Primary key: table_name, match, successor. See the version history of this table on dbdocs.io.
Columns
| Column | Type | Constraints | References | Description |
|---|---|---|---|---|
table_name | VARCHAR(255) | PK | Name of the table of the archived record(s), e.g. region. | |
match | JSON | PK | Primary key of the record to archive, or a subset of its columns to archive all records with those values, e.g. {"region_id": "2", "vendor_id": "hcloud"}. | |
successor | JSON | PK | New values of the match columns identifying the successor of each archived record. Empty when there is no successor, or none that can be given as fixed values (see reason). | |
reason | VARCHAR(255) | Why the record(s) got archived. | ||
status | ENUM | NOT NULL | Status of the resource (active or inactive). See Status for the possible values. | |
observed_at | DATETIME | NOT NULL | Timestamp of the last observation. |
Enums
Status
Last known status of a record.
The docstrings of the values are shown to end-users (e.g. in the APIAPI: Application Programming InterfaceA defined set of requests and responses through which one program uses another, such as a web service's HTTP endpoints or a library's functions.WikipediaGlossary and on the website), so keep those to what a status means, and document here how the statuses are set:
ACTIVEandINACTIVEare valid for all tables. Records returned by the vendor or defined in code areACTIVE. Records no longer returned or defined are set toINACTIVEbypull, as well as records missing from the source bysync.PLANNED_FOR_RETIREMENTandRETIREDare only valid for Server and Database, and are set only from explicit vendor signals. These are kept bypullwhen the record is no longer returned by the vendor.ARCHIVEDis valid for all tables. It is set only from the [archive rules][sc_crawler.archive_rules] bypullandsync, also for child records (e.g. prices of a regionregionA geographic area where a cloud vendor runs its data centers, such as Frankfurt or Northern Virginia, made up of one or more availability zones. A server type is offered in some regions only, and its price can differ by region; a region's ID, such aseu-central-1, is unique only within its vendor.Glossary), and archived records are not updated afterwards. It is our decision on the identity of a record, never a vendor signal: end of sale isRETIRED, and records no longer returned by a vendor areINACTIVE.
| Value | Description |
|---|---|
ACTIVE | Currently available. |
INACTIVE | Currently not available, without a known retirement. May become available again. |
PLANNED_FOR_RETIREMENT | Retirement was announced by the vendor, but can still be ordered. Only used for servers and databases. |
RETIRED | Retired by the vendor and cannot be ordered anymore, but prices may still exist (e.g. for active multi-year contracts). Only used for servers and databases. |
ARCHIVED | Kept only for historical reference: replaced by another record (e.g. renamed, merged or split) or dropped from the dataset. |