# vendor

> Compute resource vendors, such as cloud and server providers.

Primary key: `vendor_id`. See the [version history of this table on dbdocs.io](https://dbdocs.io/spare-cores/sc-crawler?table=vendor&schema=public&view=table_structure).

## Columns

| Column | Type | Constraints | References | Description |
| --- | --- | --- | --- | --- |
| `vendor_id` | `VARCHAR(255)` | PK |  | Unique identifier. |
| `name` | `VARCHAR(255)` | NOT NULL |  | Human-friendly name. |
| `logo` | `VARCHAR(255)` |  |  | Publicly accessible URL to the image of the Vendor''s logo. |
| `homepage` | `VARCHAR(255)` |  |  | Public homepage of the Vendor. |
| `country_id` | `VARCHAR(255)` | NOT NULL | [`country.country_id`](https://docs.sparecores.com/schemas/tables/country.md) | Reference to the Country, where the Vendor''s main headquarter is located. |
| `state` | `VARCHAR(255)` |  |  | Optional state/administrative area of the Vendor''s location within the Country. |
| `city` | `VARCHAR(255)` |  |  | Optional city name of the Vendor''s main location. |
| `address_line` | `VARCHAR(255)` |  |  | Optional address line of the Vendor''s main location. |
| `zip_code` | `VARCHAR(255)` |  |  | Optional ZIP code of the Vendor''s main location. |
| `founding_year` | `INTEGER` | NOT NULL |  | 4-digit year when the public cloud service of the Vendor was launched. |
| `status_page` | `VARCHAR(255)` |  |  | Public status page of the Vendor. |
| `stopped_server_charged` | `BOOL` |  |  | If the Vendor charges for stopped servers. In case it depends on the instance type or different versions of stopped states, this field reports the worst case. |
| `billing_increment_seconds` | `INTEGER` |  |  | The smallest increment of time for which the Vendor bills for. |
| `minimum_billing_seconds` | `INTEGER` |  |  | The minimum amount of time for which the Vendor bills for. In case it depends on the instance type or other context, this field reports the worst case. |
| `billing_comment` | `VARCHAR(255)` |  |  | Comment on the Vendor''s billing. |
| `status` | `ENUM` | NOT NULL |  | Status of the resource (active or inactive). See [Status](#status) for the possible values. |
| `observed_at` | `DATETIME` | NOT NULL |  | Timestamp of the last observation. |

## Foreign keys

- `country_id` → [`country`](https://docs.sparecores.com/schemas/tables/country.md) (`country_id`)

## Enums

### Status

Last known status of a record.

The docstrings of the values are shown to end-users (e.g. in the API and
on the website), so keep those to what a status means, and document here
how the statuses are set:

- `ACTIVE` and `INACTIVE` are valid for all tables. Records returned by
  the vendor or defined in code are `ACTIVE`. Records no longer returned
  or defined are set to `INACTIVE` by `pull`, as well as records missing
  from the source by `sync`.
- `PLANNED_FOR_RETIREMENT` and `RETIRED` are only valid for Server and
  Database, and are set only from explicit vendor signals. These are kept
  by `pull` when the record is no longer returned by the vendor.
- `ARCHIVED` is valid for all tables. It is set only from the
  [archive rules][sc_crawler.archive_rules] by `pull` and `sync`, also for
  child records (e.g. prices of a region), and archived records are not
  updated afterwards. It is our decision on the identity of a record,
  never a vendor signal: end of sale is `RETIRED`, and records no longer
  returned by a vendor are `INACTIVE`.

| 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. |

## Referenced by

- [`benchmark_score`](https://docs.sparecores.com/schemas/tables/benchmark_score.md)
- [`database`](https://docs.sparecores.com/schemas/tables/database.md)
- [`database_price`](https://docs.sparecores.com/schemas/tables/database_price.md)
- [`database_storage`](https://docs.sparecores.com/schemas/tables/database_storage.md)
- [`database_storage_price`](https://docs.sparecores.com/schemas/tables/database_storage_price.md)
- [`ipv4_price`](https://docs.sparecores.com/schemas/tables/ipv4_price.md)
- [`region`](https://docs.sparecores.com/schemas/tables/region.md)
- [`server`](https://docs.sparecores.com/schemas/tables/server.md)
- [`server_description`](https://docs.sparecores.com/schemas/tables/server_description.md)
- [`server_price`](https://docs.sparecores.com/schemas/tables/server_price.md)
- [`storage`](https://docs.sparecores.com/schemas/tables/storage.md)
- [`storage_price`](https://docs.sparecores.com/schemas/tables/storage_price.md)
- [`traffic_price`](https://docs.sparecores.com/schemas/tables/traffic_price.md)
- [`vendor_compliance_link`](https://docs.sparecores.com/schemas/tables/vendor_compliance_link.md)
- [`zone`](https://docs.sparecores.com/schemas/tables/zone.md)
