Skip to content

[source-mssql] update datetimeoffset format - #45142

Merged
Xiaohan Song (xiaohansong) merged 9 commits into
masterfrom
xiaohan/mssqldate
Sep 5, 2024
Merged

Xiaohan Song (xiaohansong) merged 9 commits into
masterfrom
xiaohan/mssqldate

Conversation

@xiaohansong

@xiaohansong Xiaohan Song (xiaohansong) commented Sep 4, 2024 •

Copy link
Copy Markdown
Contributor

What

#42957

Now datetimeoffset is formatted under airbyte protocol, we need to be able to parse it back.

  • writing in state we need to save it in a correct format (using mssql source operation)
  • reading out of state we should use TIMESTAMP_TZ formatter.

How

Review guide

User Impact

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

@vercel

vercel Bot commented Sep 4, 2024 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Sep 5, 2024 1:30am

@octavia-squidington-iii Octavia Squidington III (octavia-squidington-iii) removed the CDK Connector Development Kit label Sep 4, 2024
throws SQLException {
try {
final OffsetDateTime offsetDateTime = OffsetDateTime.parse(value, OFFSETDATETIME_FORMATTER);
final OffsetDateTime offsetDateTime = OffsetDateTime.parse(value, TIMESTAMPTZ_FORMATTER);

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.

this will be consistent with other places (DBZ) we use to parse MSSQL datetime offset

@theyueli

Copy link
Copy Markdown
Contributor

the integration test caught this change well :-) thanks for the fix!

@xiaohansong
Xiaohan Song (xiaohansong) merged commit 458e96e into master Sep 5, 2024
@xiaohansong
Xiaohan Song (xiaohansong) deleted the xiaohan/mssqldate branch September 5, 2024 01:43
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.

4 participants