-
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
🐛 Destination MSSQL: fix issue with unicode symbols handling (ex.\u2028 showed as ?) #3671
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for also updating the docs!
Once you've addressed the one comment, please bump the connector version like described here and update your PR with the new version: https://docs.airbyte.io/contributing-to-airbyte/building-new-connector#updating-a-connector
then publish the connector like described in the link.
@@ -53,7 +53,7 @@ public String createTableQuery(String schemaName, String tableName) { | |||
+ "WHERE s.name = '%s' AND t.name = '%s') " | |||
+ "CREATE TABLE %s.%s ( \n" | |||
+ "%s VARCHAR(64) PRIMARY KEY,\n" | |||
+ "%s VARCHAR(MAX),\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ChristopheDuong do we also need to do the same change in DBT i.e: writing strings as NVARCHARs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normalization is not handling MSSQL yet (so nothing to do there, unless implementing it...), otherwise I don't know how the mssql-dbt adapter plugin handle strings atm
@@ -53,7 +53,7 @@ public String createTableQuery(String schemaName, String tableName) { | |||
+ "WHERE s.name = '%s' AND t.name = '%s') " | |||
+ "CREATE TABLE %s.%s ( \n" | |||
+ "%s VARCHAR(64) PRIMARY KEY,\n" | |||
+ "%s VARCHAR(MAX),\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@etsybaev can you leave a comment in the code describing why NVARCHAR is used since we typically use VARCHAR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sherifnada done. Added comment to code and documentation. Thanks
Hi @sherifnada. |
@etsybaev to publish an image you need to:
|
/test connector=connectors/destination-mssql
|
/publish connector=connectors/destination-mssql
|
What
#3552 MSSQL Destination: Fix newline handling
How
Fixed MSSQL _airbyte_data field's type to support unicode.
This is for Microsoft SQL Server:
NVARCHAR is Unicode - 2 bytes per character, therefore max. of 1 billion characters; will handle East Asian, Arabic, Hebrew, Cyrillic etc. characters just fine.
VARCHAR is non-Unicode - 1 byte per character, max. capacity is 2 billion characters, but limited to the character set you're SQL Server is using, basically - no support for those languages mentioned before
Pre-merge Checklist
Recommended reading order
test.java
component.ts