How to migrate your after scripts to Python dbt models
Python dbt models (or Python Data Models) are a way to include a Python transformation of data inside of your dbt DAG.
When to use a Python Data Model vs an after script
The rule-of-thumb is that if you are writing to the data warehouse, you should be using a Python Data Model.
We are deprecating the use of
write_to_model outside of Python Data Models.
If you are already using
write_to_model to enrich an existing table, you can remove said table and replace with the model.