-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3f8b5e2
commit 79b0f21
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from pathlib import Path | ||
|
||
from prefect import Flow, Parameter, case | ||
|
||
from forklift.pipeline.shared_tasks.control_flow import check_flow_not_running | ||
from forklift.pipeline.shared_tasks.generic import drop_table_if_exists | ||
|
||
with Flow("Drop table") as flow: | ||
flow_not_running = check_flow_not_running() | ||
with case(flow_not_running, True): | ||
database = Parameter("database") | ||
table = Parameter("table") | ||
drop_table = drop_table_if_exists(database, table) | ||
|
||
flow.file_name = Path(__file__).name |
This file contains 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