Skip to content

Add referential integrity check to apply_metadata_in Dagster job #969

@eecavanna

Description

@eecavanna

Add real-time referential integrity checking to the apply_metadata_in Dagster job.

Relevant code

@graph
def apply_metadata_in():
outputs = perform_mongo_updates(get_json_in())
add_output_run_event(outputs)
materialize_alldocs()

The perform_mongo_updates function uses validate_json under the hood:

rv = validate_json(
docs, mongo.db
) # use *exact* same check as /metadata/json:validate

Nowadays, the validate_json function has a Boolean parameter that enables real-time referential integrity checking. See the function's docstring for details.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status

No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions