Skip to content

chore: Add more options to destination testing#426

Merged
kodiakhq[bot] merged 6 commits intomainfrom
test/improve_dest_testing
Nov 24, 2022
Merged

chore: Add more options to destination testing#426
kodiakhq[bot] merged 6 commits intomainfrom
test/improve_dest_testing

Conversation

@yevgenypats
Copy link
Copy Markdown
Contributor

@yevgenypats yevgenypats commented Nov 22, 2022

Added another option needed for destination testing. Needed by this PR: cloudquery/cloudquery#4902

Also, added a FlattenTables function for Tables type

reValidColumnName = regexp.MustCompile(`^[a-z_][a-z\d_]*$`)
)

func (tt Tables) FlattenTables() Tables {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but we should probably have a small test for this functionality :)

SkipOverwrite bool
SkipDeleteStale bool
SkipAppend bool
SkipAppendTwice bool
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add a comment to explain what this option does? The others are fairly self-explanatory, but I'm not sure about this one

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh okay, reading the code, maybe it could be called SkipSecondAppend?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I'm curious why this is useful as a test case 🤔

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is useful in cases like cloud storage where you can't append to an existing object the moment you closed the file as it's immutable while locally you can and of-course for PostgreSQL it's all valid.

@kodiakhq kodiakhq bot merged commit de0735a into main Nov 24, 2022
@kodiakhq kodiakhq bot deleted the test/improve_dest_testing branch November 24, 2022 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants