TGViewer
Data Apps Design Data Apps Design @data_apps · 2.08K subscribers
Post #96 361
Schema evolution showcase

Data is ever changing. A couple of examples you will definitely face with while dealing with data pipelines:

– adding new attributes, removing old ones
– changing data types: int -> float, resizeing text
– renaming columns (change mapping)

Got a couple of new events with an attribute exceeding current maximum length in database.

Simple approach is to resize problem column:

ALTER TABLE hevo.wheely_prod_orders ALTER COLUMN stops TYPE VARCHAR(4096) ;

A lot of ELT tools can do it automatically without DE attention.

In my case it's tricky as I am using Materialized Views:

> SQL Error [500310] [0A000]: Amazon Invalid operation: cannot alter type of a column used by a materialized view

As a result I had to drop dependent objects, resize columns, then re-create objects once again

DROP MATERIALIZED VIEW flatten.flt_orders CASCADE ;
DROP MATERIALIZED VIEW dbt_test.flt_orders CASCADE ;
DROP MATERIALIZED VIEW ci.flt_orders CASCADE ;

ALTER TABLE hevo.wheely_prod_orders ALTER COLUMN stops TYPE VARCHAR(4096) ;

dbt run -m flt_orders+1 --target prod
dbt run -m flt_orders+1 --target dev
dbt run -m flt_orders+1 --target ci

#pipelines #schemaevolution
More from @data_apps
  1. Aug 25, 2026🔸 Меня заблокировал Cursor Сообщение: Your Cursor account was closed following an account…
  2. Feb 27, 2026✅ 3 ОФФЕРА, мои мысли и рекомендации по поиску работы в 2026 в Data и IT в целом Салют! Чу…
  3. Feb 6, 2026Эксперимент успешный 😌 Чек-лист: https://gist.github.com/kzzzr/e49b7e0b2af01e4e1dbc57102d…
  4. Feb 6, 2026👀 DataLens: Бесплатная сказка закончилась. Кейс миграции на Superset (Open Source BI) 1 м…
  5. Feb 2, 2026😘 Открываю доступ к закрытым записям цикла Designing Modern Data Apps Всем привет! 🟡 Это…
  6. Jan 22, 2026☄ Открыт к предложениям: Staff Data Engineer / Data Platform Lead За 11+ лет я прошел путь…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →