-
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
feature(partner-sdk): added python connector example #29
Conversation
57ca765
to
642f8fd
Compare
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.
added some suggestions, please see if keeping them makes sense. example code is working fine. approved
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.
Let's get rid of the last connector
folder. All the files should go into examples/connector/python
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.
When I run this example with the connector tester, I get the following error:
java.lang.RuntimeException: java.sql.SQLException: Binder Error: Cannot change the type of a column that has a UNIQUE or PRIMARY KEY constraint specified
at testers.util.MockWarehouse.lambda$changeColumnType$12(MockWarehouse.java:281)
at testers.util.MockWarehouse.runOnConnection(MockWarehouse.java:53)
at testers.util.MockWarehouse.changeColumnType(MockWarehouse.java:268)
at testers.util.MockConnectorOutput.handleColumnChanges(MockConnectorOutput.java:307)
at testers.util.MockConnectorOutput.handleUpsert(MockConnectorOutput.java:123)
at testers.util.MockConnectorOutput.enqueueOperation(MockConnectorOutput.java:76)
at client.connector.SdkConnectorClient.update(SdkConnectorClient.java:85)
at testers.SdkConnectorTester.run(SdkConnectorTester.java:240)
at testers.SdkConnectorTester.main(SdkConnectorTester.java:87)
This is a limitation of the connector tester that currently it cannot change the data type of primary key.
Can you please update the example so it does work with the connector tester?
@@ -0,0 +1,2 @@ | |||
grpcio==1.60.1 |
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 should match the versions we are showing in the development guide. Can we not use 1.61.1
?
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.
It's working with the connector tester which I am using it for test. |
0b5f5e5
to
5094420
Compare
…dded detailed steps
5094420
to
2c01991
Compare
23d7abc
to
a67478f
Compare
t1.columns.add(name="a1", type=common_pb2.DataType.UNSPECIFIED, primary_key=True) | ||
t1.columns.add(name="a2", type=common_pb2.DataType.DOUBLE) | ||
|
||
t2 = table_list.tables.add(name="table2") |
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.
This example doesn't use table2
. Can you add an upsert for it so it gets a row in the destination?
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.
Copied from the java connector example, even it does not use it table2. I'll add simple upsert operation for it.
Closes: T-647875
Description