frictionlessdata / datapackage

Data Package is a standard consisting of a set of simple yet extensible specifications to describe datasets, data files and tabular data. It is a data definition language (DDL) and data API that facilitates findability, accessibility, interoperability, and reusability (FAIR) of data.
https://datapackage.org
The Unlicense
481 stars 109 forks source link

Ability to constraint number precision #879

Closed roll closed 2 months ago

roll commented 5 months ago

From @dafeder


Any movement on this (#709), even in terms of an unofficial pattern people have been using? Building some tooling and using the table schema where it would be very useful to specify a currency field, IE a number field with two decimal place precision. I can make up my own pattern but would like to use something with some precedent.

roll commented 5 months ago

I think it's a separate feature request on the validation level while #709 is about data interoperability issue

dafeder commented 4 months ago

@roll I think a good solution to #709 might solve this problem as well, but agree it could be addressed separately.

I haven't had capacity to engage too much in the specs definition process but FWIW continue to believe a straightforward way to specify, one way or another, that ".01", "1", "1.1" and "1.11" are all valid but "1.111" is not, would be very useful and should be prioritized. Specifying "USD" or whatever as a "unit" in a machine-readable way would also be nice but is less important.

roll commented 2 months ago

DUPLICATE to https://github.com/frictionlessdata/specs/issues/641