fix: Apply schema and record transformations for v2 sources with v3 destinations#13291
Merged
kodiakhq[bot] merged 3 commits intocloudquery:mainfrom Aug 23, 2023
Conversation
hermanschaaf
approved these changes
Aug 23, 2023
kodiakhq bot
pushed a commit
that referenced
this pull request
Aug 23, 2023
🤖 I have created a release *beep* *boop* --- ## [3.14.2](cli-v3.14.1...cli-v3.14.2) (2023-08-23) ### Bug Fixes * Apply schema and record transformations for v2 sources with v3 destinations ([#13291](#13291)) ([5fd5b59](5fd5b59)) * **deps:** Update github.com/cloudquery/arrow/go/v13 digest to 5b83d4f ([#13203](#13203)) ([b0a4b8c](b0a4b8c)) * **deps:** Update module github.com/cloudquery/plugin-sdk/v4 to v4.5.1 ([#13195](#13195)) ([a184c37](a184c37)) * **deps:** Update module github.com/cloudquery/plugin-sdk/v4 to v4.5.2 ([#13262](#13262)) ([5c55aa3](5c55aa3)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
kodiakhq bot
pushed a commit
that referenced
this pull request
Aug 24, 2023
…3 destinations (#13307) #### Summary Follow up to #13291. Fixes justmiles/cq-source-crowdstrike#5. v2 sources already add these columns so we shouldn't duplicate them. I didn't catch this during my tests since I already had the tables in the database so the destination skipped creating them. <!--
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes justmiles/cq-source-crowdstrike#5.
We should apply the schema and record transformations when the source is v2 and the destination is v3, otherwise pks are not removed in
appendmode, sync time and source name columns are not added, etc.This probably impacts all community/partners plugins as I believe those haven't upgraded to SDK v4.
Tried to do this the less possible ugly way I could think of.
Tested with: