-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
🐛Source-mssql: added support for missed data types #9094
🐛Source-mssql: added support for missed data types #9094
Conversation
/test connector=connectors/source-mssql
|
/test connector=connectors/source-mssql
|
/test-performance connector=connectors/source-mssql
|
.../bases/debezium/src/main/java/io/airbyte/integrations/debezium/internals/MSSQLConverter.java
Outdated
Show resolved
Hide resolved
...snowflake/src/main/java/io/airbyte/integrations/destination/snowflake/SnowflakeDatabase.java
Outdated
Show resolved
Hide resolved
kindly reminder that we also should bump the version for the source-mssql-strict-encrypt connector |
Sure, will do that along with changelog updating after got all approvals right before merging |
/test connector=connectors/source-mssql
|
/test connector=connectors/source-mssql
|
/test connector=connectors/source-mssql-strict-encrypt
|
/test-performance connector=connectors/source-mssql
|
…a-types # Conflicts: # docs/integrations/sources/mssql.md
Currently, we have a known issue with build on CI, but locally all checks passed. So going to release new builds |
/publish connector=connectors/source-mssql
|
/publish connector=connectors/source-mssql-strict-encrypt
|
/publish connector=connectors/source-mssql-strict-encrypt
|
What
We had lot's of types that were not handled properly by the Source-MsSql connector.
How
Updated to connector to properly process data type for a regular connection and for some of CDC connections.
The most of type are handled using different kind of native approaches.
But there is no support for the "hierarchyid" type even in the native SQL Server jdbc driver in DataTypes.
The DB stores it in it's own representation converted to HEX format.
The only way to get it as a text is to query it using internal function like this: "test_column.ToString() as test_column".
So in the final solution we make a pre-request for fetch a first row to get actual types and then wrap required fields with toString() function in eventual request: "test_column" -> "test_column.ToString() as test_column".
Also tested using UI for both full refresh and incremental sync types:
![Selection_346](https://user-images.githubusercontent.com/4688354/148544321-eebcee77-8084-400c-a415-512d15dd0201.png)
![Selection_348](https://user-images.githubusercontent.com/4688354/148544364-d00efba1-b0a8-4d10-a9bc-c9e3a2fa1b73.png)
![Selection_349](https://user-images.githubusercontent.com/4688354/148544413-a523abf2-6956-4ddd-aac8-2d7689c20d8c.png)
Full refresh:
![Selection_347](https://user-images.githubusercontent.com/4688354/148544339-e12fad8c-a792-403f-a5a7-94caa8a4f246.png
)
Incremental
![Selection_351](https://user-images.githubusercontent.com/4688354/148544485-e95c0877-3d0b-4979-a28f-f12e320d372b.png)
![Selection_352](https://user-images.githubusercontent.com/4688354/148544500-10b437aa-3460-4a37-afdc-a201efaec63b.png)
![Selection_353](https://user-images.githubusercontent.com/4688354/148544522-d02789af-de3b-4abf-9d94-e457958c8b76.png)
:
Also checked for cases with empty tables:
![Selection_354](https://user-images.githubusercontent.com/4688354/148544574-1ad9dc9b-621e-43dd-a9ec-f75d3568cd1e.png)
So lots of different tests, no fails
Recommended reading order
MssqlSource
MssqlSourceOperations
🚨 User Impact 🚨
🚨🚨 As we not handle values properly, some of them may come represented in another format, ex. number<->string<->date\datetime\time.
So probably full refresh would be required.
Pre-merge Checklist
Expand the relevant checklist and delete the others.
New Connector
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/SUMMARY.md
docs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampledocs/integrations/README.md
airbyte-integrations/builds.md
Airbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing./publish
command described hereUpdating a connector
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampleAirbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing./publish
command described here