Skip to content

Helper module for singer-io targets to deal with precision differences among taps, targets, and Python

Notifications You must be signed in to change notification settings

Datateer/adjust-precision-for-schema

Repository files navigation

Adjust Precision for Schema

Certain data sources, targets, and Python are incompatible regarding numeric precision. For example, PostgreSQL and MongoDB have higher precision than Python, leading to a decimal.DivisionImpossible error from jsonschema validators. You can see a more detailed explanation of this at https://cmsdk.com/python/decimal-invalidoperation-divisionimpossible-for-very-large-numbers.html

target-postgres solves this by walking the schema (even going into nested JSON) and adjusting the precision as needed.

This project encapsulates and improves that functionality in a standalone repository for use in any singer-io target that needs it.

Prerequisites

  • Python ^3.8
  • Poetry

Setup

  • run poetry install
  • run poetry run pre-commit install
  • run poetry rn pre-commit install --hook-type commit-msg

About

Helper module for singer-io targets to deal with precision differences among taps, targets, and Python

Resources

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages