Repository navigation
✨Use base64 to encode mssql binary field - #33755
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
|
Warning 🚨 Connector code freeze is in effect until 2024-01-02. This PR is changing connector code. Please contact the current OC engineers if you want to merge this change to master. |
Before Merging a Connector Pull RequestWow! 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:
If the checklist is complete, but the CI check is failing,
|
Rodi Reich Zilberman (rodireich)
left a comment
There was a problem hiding this comment.
This looks good.
But how is it helping with the mentioned issue of 6GB updates failing?
| throws SQLException { | ||
| final byte[] bytes = resultSet.getBytes(index); | ||
| final String value = new String(bytes, Charset.defaultCharset()); | ||
| final String value = Base64.encodeBase64String(bytes); |
There was a problem hiding this comment.
this I think is in line with what we do in other java connectors 👍
There was a problem hiding this comment.
You can add a test also for binary type
There was a problem hiding this comment.
Does that mean that a binary field in the source database is encoded as a AirbyteType String? Is that something that was discussed, or just how it was implemented for simplicity reasons?
There was a problem hiding this comment.
the current behavior for binary column is undefined in our public doc (and see slack discussion with destination team here https://airbytehq-team.slack.com/archives/C03C4AVJWG4/p1700173565688209), it sounds like base64 is the direction we are heading to; so yes mostly for simplicity reason.
|
Rodi Reich Zilberman (@rodireich) Apologize! I linked the wrong ticket. This is the one. Updated #19337 |
|
I'll have to update version after code freeze to avoid any confliction! |
Rodi Reich Zilberman (rodireich)
left a comment
There was a problem hiding this comment.
Change looks good.
I just wanted to understand for myself if mssql is different from mysql and postgres where I think we're doing specific type conversions.
|
I fully support this change (this solves other issue that we had: #30856). But from my POV this is a breaking change? My view of the situation: {
"my-byte-array": "hello"
}In destination connector we were using Now json is {
"my-byte-array": "aGVsbG8="
}same destination connector would save array So necessary steps for upgrade are:
Which is non-trivial upgrade process typically expected for patch. Am I missing something? |
What
#19337
Since airbyte transport everything in Json, binary was converted into String using default char set - thus for many cases they are not converted into a human readable string and cause confusion. Currently we did not specify how airbyte is going to handle binary in our official doc; so I propose we encode that in base64.
Slack discussion: https://airbytehq-team.slack.com/archives/C03C4AVJWG4/p1700173565688209
Result:
before:
===
after:
How
Describe the solution
Recommended reading order
x.javay.python🚨 User Impact 🚨
Are there any breaking changes? What is the end result perceived by the user?
For connector PRs, use this section to explain which type of semantic versioning bump occurs as a result of the changes. Refer to our Semantic Versioning for Connectors guidelines for more information. Breaking changes to connectors must be documented by an Airbyte engineer (PR author, or reviewer for community PRs) by using the Breaking Change Release Playbook.
If there are breaking changes, please merge this PR with the 🚨🚨 emoji so changelog authors can further highlight this if needed.
Pre-merge Actions
Expand the relevant checklist and delete the others.
New Connector
Community member or Airbyter
./gradlew :airbyte-integrations:connectors:<name>:integrationTest.0.0.1Dockerfilehas version0.0.1README.mdbootstrap.md. See description and examplesdocs/integrations/<source or destination>/<name>.mdincluding changelog with an entry for the initial version. See changelog exampledocs/integrations/README.mdAirbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
Updating a connector
Community member or Airbyter
Airbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
Connector Generator
-scaffoldin their name) have been updated with the latest scaffold by running./gradlew :airbyte-integrations:connector-templates:generator:generateScaffoldsthen checking in your changesUpdating the Python CDK
Airbyter
Before merging:
--use-local-cdk --name=source-<connector>as optionsairbyte-ci connectors --use-local-cdk --name=source-<connector> testAfter merging: