-
Notifications
You must be signed in to change notification settings - Fork 8
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
Interface changes revision-2 #58
base: main
Are you sure you want to change the base?
Changes from 4 commits
e394282
1bd70f9
92ef803
759ca84
5aeb6d3
c7c4500
29e4504
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
syntax = "proto3"; | ||
option optimize_for = SPEED; | ||
option java_multiple_files = true; | ||
option go_package = "fivetran.com/fivetran_sdk"; | ||
package fivetran_sdk; | ||
option go_package = "fivetran.com/fivetran_sdk_r2"; | ||
package fivetran_sdk.r2; | ||
|
||
import "google/protobuf/timestamp.proto"; | ||
import "common.proto"; | ||
|
||
// Fivetran (grpc client) <> Destination (grpc server) | ||
service Destination { | ||
// Fivetran (grpc client) <> DestinationConnector (grpc server) | ||
service DestinationConnector { | ||
rpc ConfigurationForm (ConfigurationFormRequest) returns (ConfigurationFormResponse) {} | ||
rpc Capabilities (CapabilitiesRequest) returns (CapabilitiesResponse) {} | ||
rpc Test (TestRequest) returns (TestResponse) {} | ||
|
@@ -55,7 +55,26 @@ message CreateTableResponse { | |
message AlterTableRequest { | ||
map<string, string> configuration = 1; | ||
string schema_name = 2; | ||
Table table = 3; | ||
string table_name = 3; | ||
repeated SchemaDiff changes = 4; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do our own DataWriter implementations get something like this? How is it generated? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, our SDKDataWriter generates the schema difference. The same approach is followed across all the DataWriters. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @georgewfraser no they don't "get" it from the core, they calculate it themselves. This is something new we introduced so the partner code doesn't have to calculate it. It would be great if we can move this to the core so the other data writers didn't have to perform the diff either. (In fact, the core doesn't even do a simple compare between existing and new schema, calling |
||
} | ||
|
||
message SchemaDiff { | ||
oneof change { | ||
Column add_column = 1; | ||
ChangeType change_column_type = 2; | ||
PrimaryKey update_primary_keys = 3; | ||
} | ||
} | ||
|
||
message PrimaryKey { | ||
repeated string column_name = 1; | ||
} | ||
|
||
message ChangeType { | ||
string column_name = 1; | ||
DataType new_type = 2; | ||
optional DataTypeParams params = 3; | ||
} | ||
|
||
message AlterTableResponse { | ||
|
@@ -75,7 +94,7 @@ message TruncateRequest { | |
} | ||
|
||
message SoftTruncate { | ||
string deleted_column = 3; | ||
string deleted_column = 1; | ||
} | ||
|
||
message TruncateResponse { | ||
|
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.
Why are we changing the package name?
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.
We are introducing breaking changes and will use the identifier
revision (r2)
to denote the version for these updates.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.
@georgewfraser as we discussed during the previous meeting, we need to be able to run one version in production while we need to be able to build and release different interface version in the testers to give to the partners. Since the testers are in the engineering repo too, there is no way to have two versions of grpc interface in the same package. So we introduced the "_r2" for "revision 2". (We chose to replace "version" with "revision" to indicate we are not going to use versions)