Repository navigation
Conversation
9ff227a to
5180c03
Compare
5180c03 to
56ab8a3
Compare
| }, | ||
| }; | ||
|
|
||
| export const overrideProtectedOption: INamedOption<yargs.Options, IRunArgs> = { |
There was a problem hiding this comment.
Since protected defaults to true, run --full-refresh --override-protected without --actions/--tags recreates every incremental table in the project, including ones whose history can't be rebuilt (e.g. sources with limited retention). Would it be worth adding a guardrail here, e.g. requiring --actions or --tags alongside this flag, or at least printing a warning listing the protected tables that will be recreated (in --dry-run too)?
There was a problem hiding this comment.
I think requiring --actions or --tags could be cumbersome for users wanting to quickly recreate a large project (e.g. during testing/initial iterating/in sandbox environments). It's true that this is a risky operation but since it requires explicitly passing two different options I think that's acceptable.
I can add a warning though - this will remind users who use a dry run about potential consequences, though it won't stop accidentally purging data in real runs.
a5231ba to
17ae218
Compare
rafal-hawrylak
left a comment
There was a problem hiding this comment.
The description does not mention the warning that was added during review.
77a8b46 to
bc9c00d
Compare
bc9c00d to
ea77282
Compare
Allow users to recreate protected incremental tables without having to set protected=false on every action (e.g. for local/sandbox backfills) by passing the --override-protected flag.
With --full-refresh and --override-protected, all incremental tables, including protected ones, will be recreated. --override-protected without --full-refresh throws an error.
A warning will be printed (including on dry runs) when running with --override-protected --full-refresh listing the protected tables that would be dropped, to remind users of the risks of data loss.