dagster icon indicating copy to clipboard operation
dagster copied to clipboard

metadata range asset checks

Open johannkm opened this issue 9 months ago • 2 comments

Add an experimental build_metadata_range_checks factory for asserting that a numeric metadata value is within a range.

@asset
def my_asset():
  return MaterializeResult(metadata={"my_metadata": 5})

checks = build_metadata_range_checks(
  assets=[my_asset], metadata_key="my_metadata", min_value=1, max_value=10
)

johannkm avatar May 03 '24 14:05 johannkm

  • #21630 Graphite 👈
  • master

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @johannkm and the rest of your teammates on Graphite Graphite

johannkm avatar May 03 '24 14:05 johannkm

Deploy preview for dagster-docs ready!

Preview available at https://dagster-docs-1d6bu7ab8-elementl.vercel.app https://johann-05-03-metadata-range-check.dagster.dagster-docs.io

Direct link to changed pages:

  • https://dagster-docs-1d6bu7ab8-elementl.vercel.app https://johann-05-03-metadata-range-check.dagster.dagster-docs.io/concepts/dagster-pipes/databricks
  • https://dagster-docs-1d6bu7ab8-elementl.vercel.app https://johann-05-03-metadata-range-check.dagster.dagster-docs.io/integrations/airbyte
  • https://dagster-docs-1d6bu7ab8-elementl.vercel.app https://johann-05-03-metadata-range-check.dagster.dagster-docs.io/integrations/databricks

github-actions[bot] avatar May 03 '24 14:05 github-actions[bot]

As I think about more places where these names will show up – e.g. a button in the UI next to a metadata value that allows creating a check from it –, I feel less convinced on "limit". "Limit" feels like it has the connotation of "rate limit" or "select * from x limit 5".

This leads me to lean more towards something like "bound" or "threshold". Maybe worth getting the opinions of the dev rel folks?

sryza avatar May 20 '24 16:05 sryza

updated to bounds

johannkm avatar May 21 '24 19:05 johannkm