Skip to content

Commit

Permalink
check for date and datetime in stream_maps
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Koutsimpogiorgos committed Sep 4, 2024
1 parent 640e00b commit 6ac8918
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions singer_sdk/mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,12 @@ def _eval_type(
if expr.startswith("bool("):
return th.BooleanType()

if expr.startswith("datetime.date"):
return th.DateType()

if expr.startswith("datetime.datetime"):
return th.DateTimeType()

return th.StringType() if expr[0] == "'" and expr[-1] == "'" else default

def _init_functions_and_schema( # noqa: PLR0912, PLR0915, C901
Expand Down

0 comments on commit 6ac8918

Please sign in to comment.