dbt-labs/dbt-core

Enable contexts for serialization

gshank opened this issue · 0 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