#1695 bug: Mapped datetime values are typed as strings in the schema message
Issue created by
edgarrmondragon
Singer SDK Version
0.26.0
Is this a regression?
• Yes
Python Version
NA
Bug scope
Mapping (stream maps, flattening, etc.)
Operating System
NA
Description
When generating a datetime value from a string using stream map functionality, e.g.
stream_maps:
my_stream:
created: datetime.datetime.from_timestamp(createdAt)
the detected schema type for the value falls back to string.
sdk/singer_sdk/mapper.py
Lines 372 to 379 in</meltano/sdk/commit/33d64c8dc94d039368bee16da6ab0037e6672ff6|33d64c8>
| if expr.startswith("float("): |
| ----------------------------- |
| return NumberType() |
| |
| if expr.startswith("int("): |
| return IntegerType() |
| |
| if expr.startswith("str("): |
| return StringType() |
Code
No response
meltano/sdk