Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decimal format in schema definition in IoText data protocol need precision #4

Open
bieli opened this issue Aug 9, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@bieli
Copy link
Owner

bieli commented Aug 9, 2023

We need to define in schema, what will be destination precision of metrics values, in case of DECIMAL type metrics like d:12.345.
In Python, there is a Decimal object and context global state, when we define prec value - here is the spec.

This something easy to implement with one two-digit value (max. 28), but in other languages, we can define two values (precision and scale in BigDecimal class) e.g. in Java language it's like this spec.

Another example, from the data engineering world is definition for AVRO schema in Kafka ecosystem. We can express Decimals in schema definition like in Java lang. e.g.

{
  "type": "bytes",
  "logicalType": "decimal",
  "precision": 4,
  "scale": 2
}

We are open to proposals here.

@bieli bieli added the enhancement New feature or request label Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant