You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, a field with a value of "abc" and a jsonschema type of ["boolean", "string"] would cause is_boolean_type() to return True. Then as a result, _conform_primitive_property() would coerce "abc" to boolean, resulting in that field's value being True.
Singer SDK Version
0.38.0
Is this a regression?
Python Version
3.11
Bug scope
Taps (catalog, state, etc.)
Operating System
Ubuntu 22.04.4 LTS
Description
Multiple taps (tap-postgres, tap-universal-file) use monkeypatched logic for
_conform_primitive_property
oris_boolean_type
. This is because the default logic for these functions causes non-boolean types to be coerced to eitherTrue
orFalse
.For example, a field with a value of
"abc"
and a jsonschema type of["boolean", "string"]
would causeis_boolean_type()
to returnTrue
. Then as a result,_conform_primitive_property()
would coerce"abc"
to boolean, resulting in that field's value beingTrue
.Here's the patched
is_boolean_type
that I implemented for tap-universal-file: https://github.com/MeltanoLabs/tap-universal-file/blob/4850e7d933de1b2c4a8f623c5cb7fa089eb1f1a0/tap_universal_file/client.py#L21-L50Related discussion of
_conform_primitive_property
, but with regard to dates/datetimes instead of booleans: #1831Code
No response
The text was updated successfully, but these errors were encountered: