Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong date string serialization in jsonschema #10

Closed
gallejesus opened this issue Feb 8, 2024 · 6 comments
Closed

Wrong date string serialization in jsonschema #10

gallejesus opened this issue Feb 8, 2024 · 6 comments
Assignees

Comments

@gallejesus
Copy link

Hello,

We are finding an issue when dealing with Date columns due to String serialization.

In Meltano SDK, a Date it being serialized as f"{elem.isoformat()}T00:00:00+00:00" (https://github.com/meltano/sdk/blob/b02d698c15c1fff8667e18e5301c65a0fd0247b5/singer_sdk/helpers/_typing.py#L477-L478) which will always fail afterwards jsonschema validation, as the serialized string does not match jsconschema Date format (https://json-schema.org/understanding-json-schema/reference/string#dates-and-times).

Several taps have already implemented a workaround:

cc: @Plozano94

@Plozano94
Copy link

Plozano94 commented Feb 8, 2024

We are pretty aware that the main issue is in the SDK but we'll appreciate the workaround until they decide to fix it :)

@pulsar256
Copy link
Contributor

here is another workaround which can be applied in the tap configuration:

(...)
      stream_maps:
        my_stream:
          my_date: _['my_date'][0:10]

Is this a reported issue in the SDK? I skimmed through the open issues and was not able to spot it right away.

@pulsar256
Copy link
Contributor

Is this a reported issue in the SDK? I skimmed through the open issues and was not able to spot it right away.

meltano/sdk#1831

@pulsar256
Copy link
Contributor

fixed upstream in the SDK meltano/sdk#2580 in and released with 0.39.1 https://github.com/meltano/sdk/releases/tag/v0.39.1

@akurdyukov
Copy link
Owner

Ok, I'll try to update SDK in this project this weekend.

@akurdyukov akurdyukov self-assigned this Aug 17, 2024
akurdyukov added a commit that referenced this issue Aug 17, 2024
@akurdyukov
Copy link
Owner

Please check and reopen if the problem isn't fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants