datahq / dataflows

DataFlows is a simple, intuitive lightweight framework for building data processing flows in python.
https://dataflows.org
MIT License
194 stars 39 forks source link

How would I add minimum/maximum constraints? #86

Open anuveyatsu opened 5 years ago

anuveyatsu commented 5 years ago

E.g., I have a table with time series and I wish to have constraints.minimum and constraints.maximum in the schema so that I have aggregated information about the table.

Is there a standard approach using existing processors or should I go for a custom processor?

akariv commented 5 years ago

You can use the set_type processor for setting constraints. Something like this:

set_type(fieldname, constraints=dict(required=True))

On Wed, May 8, 2019, 09:06 Anuar Ustayev notifications@github.com wrote:

E.g., I have a table with time series and I wish to have constraints.minimum and constraints.maximum in the schema so that I have aggregated information about the table.

Is there a standard approach using existing processors or should I go for a custom processor?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/datahq/dataflows/issues/86, or mute the thread https://github.com/notifications/unsubscribe-auth/AACAY5M7KOMMVVDFYFKIM3DPUJUXTANCNFSM4HLOVEQA .