Skip to main content

sc_crawler.tables_scd

SCD version of the table definitions in sc_crawler.tables.

Classes:

  • Scd – Override the observed_at column to be primary key in SCD tables.
  • CountryScd – Country and continent mapping (SCD Type 2).
  • VendorComplianceLinkScd – List of known Compliance Frameworks paired with vendors (SCD Type 2).
  • ComplianceFrameworkScd – List of Compliance Frameworks, such as HIPAA or SOC 2 Type 1 (SCD Type 2).
  • VendorScd – Compute resource vendors, such as cloud and server providers (SCD Type 2).
  • RegionScd – Regions of Vendors (SCD Type 2).
  • ZoneScd – Availability zones of Regions (SCD Type 2).
  • StorageScd – Flexible storage options that can be attached to a Server (SCD Type 2).
  • ServerScd – Server types (SCD Type 2).
  • ServerPriceScd – Server type prices per Region and Allocation method (SCD Type 2).
  • ServerDescriptionScd – Variable length, plain English descriptions of Server hardware specs, performance, cost-efficiency, and workflow fit (SCD Type 2).
  • StoragePriceScd – Flexible Storage prices in each Region (SCD Type 2).
  • DatabaseScd – Managed database SKUs (SCD Type 2).
  • DatabasePriceScd – Managed database SKUSKU: Stock Keeping UnitAn identifier of a product a vendor sells, e.g. a server type, or a component that its price is built from, such as a vCPU or a GB of memory in a region. Cloud vendors' price lists are made of SKUs, which the Crawler combines into the price of each server type.Glossary prices per Region (SCD Type 2).
  • DatabaseStorageScd – Managed database storage products (SCD Type 2).
  • DatabaseStoragePriceScd – Managed database storage prices in each Region (SCD Type 2).
  • TrafficPriceScd – Extra Traffic prices in each Region (SCD Type 2).
  • Ipv4PriceScd – Price of an IPv4 address in each Region (SCD Type 2).
  • BenchmarkScd – Benchmark scenario definitions (SCD Type 2).
  • BenchmarkScoreScd – Results of running Benchmark scenarios on Servers or managed Databases (SCD Type 2).
  • ArchiveRuleScd – Rules archiving records that were replaced by another record or deliberately dropped (SCD Type 2).

Attributes:

class Scd tables_scd.py:46–54⁠ (opens in a new tab)​

Bases: ScModel

Override the observed_at column to be primary key in SCD tables.

class CountryScd tables_scd.py:57–60⁠ (opens in a new tab)​

Bases: Scd, CountryBase

Country and continent mapping (SCD Type 2).

Attributes:

class VendorComplianceLinkScd tables_scd.py:63–73⁠ (opens in a new tab)​

Bases: Scd, VendorComplianceLinkBase

List of known Compliance Frameworks paired with vendors (SCD Type 2).

Attributes:

class ComplianceFrameworkScd tables_scd.py:76–79⁠ (opens in a new tab)​

Bases: Scd, ComplianceFrameworkBase

List of Compliance Frameworks, such as HIPAA or SOC 2 Type 1 (SCD Type 2).

Attributes:

class VendorScd tables_scd.py:82–87⁠ (opens in a new tab)​

Bases: Scd, VendorBase

Compute resource vendors, such as cloud and server providers (SCD Type 2).

Examples:

>>> from sc_crawler.tables import Vendor
>>> from sc_crawler.lookup import countries
>>> aws = Vendor(vendor_id='aws', name='Amazon Web Services', homepage='https://aws.amazon.com', country=countries["US"], founding_year=2002)
>>> aws
Vendor(vendor_id='aws'...
>>> from sc_crawler import vendors
>>> vendors.aws
Vendor(vendor_id='aws'...

Attributes:

class RegionScd tables_scd.py:90–99⁠ (opens in a new tab)​

Bases: Scd, RegionBase

Regions of Vendors (SCD Type 2).

Attributes:

class ZoneScd tables_scd.py:102–108⁠ (opens in a new tab)​

Bases: Scd, ZoneBase

Availability zones of Regions (SCD Type 2).

Attributes:

class StorageScd tables_scd.py:111–117⁠ (opens in a new tab)​

Bases: Scd, StorageBase

Flexible storage options that can be attached to a Server (SCD Type 2).

Attributes:

class ServerScd tables_scd.py:120–126⁠ (opens in a new tab)​

Bases: Scd, ServerBase

Server types (SCD Type 2).

Attributes:

class ServerPriceScd tables_scd.py:129–135⁠ (opens in a new tab)​

Bases: Scd, ServerPriceBase

Server type prices per Region and Allocation method (SCD Type 2).

Attributes:

class ServerDescriptionScd tables_scd.py:138–144⁠ (opens in a new tab)​

Bases: Scd, ServerDescriptionBase

Variable length, plain English descriptions of Server hardware specs, performance, cost-efficiency, and workflow fit (SCD Type 2).

Attributes:

class StoragePriceScd tables_scd.py:147–153⁠ (opens in a new tab)​

Bases: Scd, StoragePriceBase

Flexible Storage prices in each Region (SCD Type 2).

Attributes:

class DatabaseScd tables_scd.py:156–162⁠ (opens in a new tab)​

Bases: Scd, DatabaseBase

Managed database SKUs (SCD Type 2).

Attributes:

class DatabasePriceScd tables_scd.py:165–171⁠ (opens in a new tab)​

Bases: Scd, DatabasePriceBase

Managed database SKU prices per Region (SCD Type 2).

Attributes:

class DatabaseStorageScd tables_scd.py:174–180⁠ (opens in a new tab)​

Bases: Scd, DatabaseStorageBase

Managed database storage products (SCD Type 2).

Attributes:

class DatabaseStoragePriceScd tables_scd.py:183–189⁠ (opens in a new tab)​

Bases: Scd, DatabaseStoragePriceBase

Managed database storage prices in each Region (SCD Type 2).

Attributes:

class TrafficPriceScd tables_scd.py:192–198⁠ (opens in a new tab)​

Bases: Scd, TrafficPriceBase

Extra Traffic prices in each Region (SCD Type 2).

Attributes:

class Ipv4PriceScd tables_scd.py:201–207⁠ (opens in a new tab)​

Bases: Scd, Ipv4PriceBase

Price of an IPv4 address in each Region (SCD Type 2).

Attributes:

class BenchmarkScd tables_scd.py:210–213⁠ (opens in a new tab)​

Bases: Scd, BenchmarkBase

Benchmark scenario definitions (SCD Type 2).

Attributes:

class BenchmarkScoreScd tables_scd.py:216–226⁠ (opens in a new tab)​

Bases: Scd, BenchmarkScoreBase

Results of running Benchmark scenarios on Servers or managed Databases (SCD Type 2).

Attributes:

class ArchiveRuleScd tables_scd.py:229–232⁠ (opens in a new tab)​

Bases: Scd, ArchiveRuleBase

Rules archiving records that were replaced by another record or deliberately dropped (SCD Type 2).

The rules are defined in sc_crawler.archive_rules, and are applied by the pull and sync commands (see apply), which set the matched records and their child records to ARCHIVED.

Examples:

>>> from sc_crawler.tables import ArchiveRule
>>> ArchiveRule(table_name="benchmark", match={"benchmark_id": "foo"}, reason="Dropped.")
ArchiveRule(table_name='benchmark', match={'benchmark_id': 'foo'}, reason='Dropped.', successor={}...

Attributes:

attr tables_scd tables_scd.py:235⁠ (opens in a new tab)​

tables_scd: List[SQLModel] = [o for o in globals().values() if is_table(o)]

List of all SCD SQLModel (table) models.