Skip to content

[Source-mssql] Datetimeoffset field used as cursor error patch - #33330

Merged
Duy Nguyen (nguyenaiden) merged 6 commits into
masterfrom
timestamptz_cursor_patch
Dec 12, 2023
Merged

Duy Nguyen (nguyenaiden) merged 6 commits into
masterfrom
timestamptz_cursor_patch

Conversation

@nguyenaiden

@nguyenaiden Duy Nguyen (nguyenaiden) commented Dec 11, 2023 •

Copy link
Copy Markdown
Contributor

Description: Currently, Source-mssql is using OffsetDateTime.parse for DATETIMEOFFSET fields which is incorrect because that method is parsing the timestamp string into ISO Datetime format. For MSSQL, this field should be parsed with the yyyy-MM-dd HH:mm:ss.SSSSSSS XXX format.

Addresses issue

@vercel

vercel Bot commented Dec 11, 2023 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Dec 12, 2023 8:33pm

@github-actions

github-actions Bot commented Dec 11, 2023 •

Copy link
Copy Markdown
Contributor

Before Merging a Connector Pull Request

Wow! What a great pull request you have here! 🎉

To merge this PR, ensure the following has been done/considered for each connector added or updated:

  • PR name follows PR naming conventions
  • Breaking changes are considered. If a Breaking Change is being introduced, ensure an Airbyte engineer has created a Breaking Change Plan.
  • Connector version has been incremented in the Dockerfile and metadata.yaml according to our Semantic Versioning for Connectors guidelines
  • You've updated the connector's metadata.yaml file any other relevant changes, including a breakingChanges entry for major version bumps. See metadata.yaml docs
  • Secrets in the connector's spec are annotated with airbyte_secret
  • All documentation files are up to date. (README.md, bootstrap.md, docs.md, etc...)
  • Changelog updated in docs/integrations/<source or destination>/<name>.md with an entry for the new version. See changelog example
  • Migration guide updated in docs/integrations/<source or destination>/<name>-migrations.md with an entry for the new version, if the version is a breaking change. See migration guide example
  • If set, you've ensured the icon is present in the platform-internal repo. (Docs)

If the checklist is complete, but the CI check is failing,

  1. Check for hidden checklists in your PR description

  2. Toggle the github label checklist-action-run on/off to re-run the checklist CI.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it's the exact same as the overriden function. Please remove

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bug really is in the parent method that should parse yyyy-MM-dd'T'HH:mm:ss.SSSSSS**SSS**XXX instead of `yyyy-MM-dd'T'HH:mm:ss.SSSSSSXXX'.
Please document that and create a separate issue for the CDK issue (we''l obviously need to add more generic tests)
Why do we have a space in the MS-SQL formatter, while there's none in the "generic" formatter?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is super nasty stuff.
Can you add a comment that points to the fact that OffsetDateTime is a java construct, while DateTimeOffset is a sql server construct, and that the offset there is defined in minutes?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It really is. The naming confusion took me so long to identify. I'll make a note of all of your comments shortly.

@nguyenaiden
Duy Nguyen (nguyenaiden) merged commit 44ce002 into master Dec 12, 2023
@nguyenaiden
Duy Nguyen (nguyenaiden) deleted the timestamptz_cursor_patch branch December 12, 2023 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/connectors Connector related issues area/documentation Improvements or additions to documentation connectors/source/mssql

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants