Documentation
¶
Overview ¶
Package scd2migration is a TEMPORARY, self-contained upgrade shim.
⚠️ TEMPORARY MIGRATION — SAFE TO DELETE AFTER IT EXPIRES ⚠️
Created: 2026-07-08
Expires: 2026-10-08 (~3 months later)
Purpose: SCD2 tables created before _valid_from/_valid_until became
timezone-aware still carry the legacy column types. This shim
converts them on the incremental path, reading the stored values
as UTC. It is a no-op once the columns are correct, so it is safe
to run on every incremental.
Affects: Postgres, Snowflake, MySQL and Oracle (this package). DuckDB and
Athena are NOT affected — their incremental rebuilds the table and
converts legacy values automatically.
Removal: On or after the expiry date, once existing deployments have run at
least once on the timezone-aware release, delete this package and
the call sites in pkg/{postgres,snowflake,mysql,oracle}/operator.go.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MySQL ¶
MySQL converts the legacy VARCHAR _valid_until (from the old string sentinel) and any non-DATETIME _valid_from to DATETIME. MySQL SCD2 columns are naive (UTC by convention), so no timezone conversion is applied.
func Oracle ¶
Oracle converts naive bruin_valid_from/bruin_valid_until columns to TIMESTAMP(6) WITH TIME ZONE, reading the naive values in the session timezone and normalizing the result to a UTC (+00) offset.
Types ¶
Click to show internal directories.
Click to hide internal directories.