-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
catalogDiff
object gives incomplete information about primary key changes
#16092
Comments
From our previous discussion, should we do the same for cursor fields? It could be a different story, but the logic itself feels very close here. |
A source-defined cursor changing could change what data is being synced. So yes, it seems relevant to expose that. Good catch! |
This came up in a conversation I was having with @andyjih, and I think we might want to think about distinguishing two things: schema updates and connection updates. I think we had been using catalogDiff on the backend for source schema updates, which just means changes to the schema of the streams within the connection. A user changing a primary key or cursor field is a change within their connection catalog settings, not a schema update. This is a bug we should fix but also wanted to highlight how maybe either the naming or how our models/API endpoints are structured are causing some confusion. Maybe instead of Just some thoughts I wanted to get down! |
That makes sense! In this particular context I was thinking about Sources that have a source-defined primary key/cursor field, not when a user changes it in the UI. |
During grooming it was decided that this is not likely occurring frequently so it's been moved to Low priority. |
@flutra-osmani / @malikdiarra since you've both been working w/ schema changes lately... We still return an empty array of transforms + label the connection has having a non-breaking change when a primary key is added (but was an existing column). Here's how that ends up looking to a user (this is the "fully open" state): Can we either (a) not label this as a schema change on the connection or (b) return the field in the transforms array with a new transform type to reflect what happened ("primary key changed" or something?) |
Refining notes:
|
I have tried to reproduce this locally but I don't see it. This is my setup:
|
Similarly, I removed the index from stream So, at least this seems to be behaving as |
https://www.loom.com/share/76b7c452581f4e12a58432fe984d67e5 Edit: this should solve the weird UX I think. It seems like a "nice to have" to someday show the PK/cursor changes... but not worth the amount of changes required in the protocol to do it. |
I see, thanks for the context.
Yes, agree. I think your change is a good compromise. |
When I change a primary key in a source that has an existing connection and then run a refresh, I get back the following in
connection.cataglogDiff
:which doesn't give much useful information about how the table changed in this case. In this table, I got back an entry that looked like this both when changing the primary key in a table with a single primary key, and in adding or removing a field from a composite primary key on a table.
It would be nice to get the information about the primary key change, perhaps in a similar format to how we get back information about field type changes.
The text was updated successfully, but these errors were encountered: