[ Feature request] coerce_number_to_str
- like optional flag while reading data to handle known datatype inconsistencies
#238
Labels
While fetching data with
find_polars_all
,find_pandas_all
,find_arrow_all
frompymongoarrow.api
, the schema is being inferred based on first document. If the same key is having different datatype, it is inferred asnull
.MongoDB documentation
Current implementation
In case of such known discrepancies where the first document have
pyarrow.str()
and subsequent documents havepyarrow.int*()
, which can be inferred aspyarrow.str()
by adding an optional parametercoerce_number_to_str
for allfind_*
apis.Expected implementation
Reference -
coerce_numbers_to_str
in https://docs.pydantic.dev/latest/api/fields/#pydantic.fields.FieldThe text was updated successfully, but these errors were encountered: