meltano / sdk

Write 70% less code by using the SDK to build custom extractors and loaders that adhere to the Singer standard: https://sdk.meltano.com
https://sdk.meltano.com
Apache License 2.0
98 stars 70 forks source link

fix: Mapped datetime values are now typed as `date-time` strings in the schema message #2665

Closed gregkoutsimp closed 2 months ago

gregkoutsimp commented 2 months ago

When generating a datetime value from a string using stream map functionality, the detected schema type for the value falls back to string.

In this implementation we extend _eval_type method of class CustomStreamMap from the mapper.py to be bale to process dates and datetimes data types in stream maps.

Closes #1695


📚 Documentation preview 📚: https://meltano-sdk--2665.org.readthedocs.build/en/2665/

codspeed-hq[bot] commented 2 months ago

CodSpeed Performance Report

Merging #2665 will not alter performance

Comparing gregkoutsimp:1695_bug_fix_datetype_stream_maps (3281177) with main (6b3869d)

Summary

✅ 6 untouched benchmarks

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 89.86%. Comparing base (6b3869d) to head (3281177). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2665 +/- ## ========================================== + Coverage 89.82% 89.86% +0.04% ========================================== Files 58 58 Lines 4886 4886 Branches 960 960 ========================================== + Hits 4389 4391 +2 + Misses 346 344 -2 Partials 151 151 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.