dbt-labs / dbt-core

dbt enables data analysts and engineers to transform their data using the same practices that software engineers use to build applications.

Home Page:https://getdbt.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Enable contexts for serialization

gshank opened this issue · comments

Description

In some cases we'd like to serialize differently for creating artifacts and saving the internal manifest (and possibly other purposes too). Mashumaro has a feature to enable passing along a context dictionary to pre_serialize and post_serialize calls.

Acceptance Criteria

We can use a context parameter in to_dict calls: obj.to_dict(context={"test": True}).

Impact to other teams

We need to change the signature of all pre_ and post_serialize calls, so we need to verify that nobody else is using these.

Will backports be required

No

Context